2 of 6
2
Checkboxes
Posted: 11 December 2006 11:43 AM   [ Ignore ]   [ # 19 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  878
Joined  05-14-2004

Ok. So making the keywords into urls would be possible?

Profile
 
 
Posted: 11 December 2006 11:45 AM   [ Ignore ]   [ # 20 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

I would think so, but I’m not positive, I haven’t used auto search all that often.  Do you have a link that I could do some research at?

 Signature 

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

Profile
 
 
Posted: 11 December 2006 12:51 PM   [ Ignore ]   [ # 21 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  878
Joined  05-14-2004

I basically took the information from here.

I think the type of keywording i want to do is perfect for this. Its just getting it to work in a dynamic manner LOL

Thanks for the help and all the excellent extensions.

Profile
 
 
Posted: 11 December 2006 01:21 PM   [ Ignore ]   [ # 22 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

Hum, well I don’t see any reason why you wouldn’t be able to get that to work.  I think the one custom field to mirror the keywords “title” should do it, and then create the checkboxes to link up to that mirrored field.

 Signature 

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

Profile
 
 
Posted: 21 December 2006 04:17 PM   [ Ignore ]   [ # 23 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  103
Joined  06-03-2003

Thank you! Thank you! Thank you!!!

This works perfectly in the CP. Has anyone got this working in a Stand Alone Entry Form?

I’ve only tried the following and it doesn’t output anything. I didn’t really expect it to but don’t know what may be needed to loop through and display the values as needed:

{if checkbox}
<input type="checkbox" name="{field_name}" value="{field_data}" />
{/if}

Another donation coming your way, Mark! Your extensions are exactly what we’re needing on this project!

 Signature 

Shane Robinson - twitter.com/shane

PodCamp Hawaii, October 24-25, 2008 - http://2008.PodCampHawaii.com
http://www.barefeetstudios.com
http://www.beachwalks.tv
http://reef.beachwalks.tv

Profile
 
 
Posted: 31 December 2006 12:57 PM   [ Ignore ]   [ # 24 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1709
Joined  03-26-2006

I have successfully installed this on past 1.5.2 installs - but today it’s not working! I downloaded 1.0.2 (which still says 1.0.1 when installed, by the way…) and I applied it to a custom field (just a bunch of sizes like XS, S, M, L , XL, etc) and I’m getting this error: Notice: Undefined variable: field_type in /Users/me/Sites/mysite/system/cp/cp.publish_ad.php on line 5465 I don’t have a lot of other plugins or extensions installed (this is a new site, only adding things as I need them) and those things I have added are mostly Mark’s (no surprise there…) so I’m not sure what could be conflicting.

I haven’t seen this conflict yet. So I not really have v 1.0.2 installed?

I am on this page when the error shows at the top:
CP Home ›  Admin ›  Weblog Administration ›  Field Groups ›  Custom Fields

 Signature 

ryan masuga
—————
Masuga Design | Member, EE Pro Network
My EE Add-Ons | {devot:ee}
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 17 January 2007 02:04 PM   [ Ignore ]   [ # 25 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  183
Joined  03-21-2006

I decided to re-write this entire post to make it more accurate.

This is what I need to do and I’m not sure the current Extension does it.

I need to be able to assign a value to each check box:

Example:

Web Design == http://www.re-volvemedia.com/services/development/web-design/

This way when writing a Case Study we can list the services we performed for each client and have a check box associated with each service we provide.  Currently I’m not sure that is an option, however, I was curious as to if the text from the Check Box is static text or if it has a variable name associated with it.

Example:

Label: Web Design
Form ID: web_design

I’m not sure that it would work, but I need to try and figure out a solution that would do what we need it to.

If this can be done, can someone help point me in the right direction?

Edit:

I figured out a work around

{if development == "Website Design"}<li><a href="http://www.re-volvemedia.com/services/development/web-design/">Web Design</a></li>{/if}

This has worked but it is not printing the results accurately yet.  I have it twice in one page and it is only showing up once…looking into it.

Edit(2):

I made an attachment so you could see what it was doing.  I also included the custom tags so you could see they both had the same box checked, but only the bottom one was showing the {if} statement.

Edit(3):

Okay, I figured out what the problem is.  I currently have 5 check box groups.

“development” has 6 items to check.

Web Design
E-Commerce
Content Management
MOD RE-writes
Application Development
Hosting

So my statement:

{if development == "Website Design"}<li><a href="http://www.re-volvemedia.com/services/development/web-design/">Web Design</a></li>{/if}

Works as long as it is the only 1 of the 6 checked, however, if you have more then 1 checked it would become.

“Web Design, E-Commerce” or something similar.

Is there a way to fix this so each one outputs a unique string?  I’m not sure how to break this down further?

Image Attachments
check_box_issue_1.jpg
Click thumbnail to see full-size image
 Signature 

http://www.sethaldridge.com/

Profile
 
 
Posted: 18 January 2007 03:02 PM   [ Ignore ]   [ # 26 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

Seth, I might do this with PHP, since your correct in saying that the EE tag’s can’t handle searching within a string.  Something like this should work:

<?php ob_start(); ?>{development}<?php if(strpos(ob_get_contents(), "Web Design")!==false): ?>... do stuff here ...<?php endif; ob_end_clean(); ?>

Oh, and for this your PHP will have to be on “output”.

 Signature 

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

Profile
 
 
Posted: 18 January 2007 03:04 PM   [ Ignore ]   [ # 27 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

medsign: check this out: http://expressionengine.com/forums/viewthread/38843/#181791

 Signature 

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

Profile
 
 
Posted: 18 January 2007 03:41 PM   [ Ignore ]   [ # 28 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  183
Joined  03-21-2006

Mark,

I used the code you sent and this is what it output.

Image Attachments
check_box_issue_2.jpg
Click thumbnail to see full-size image
 Signature 

http://www.sethaldridge.com/

Profile
 
 
Posted: 18 January 2007 04:02 PM   [ Ignore ]   [ # 29 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

seth, can you post a snippet of the EE code generating the linked image?

 Signature 

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

Profile
 
 
Posted: 18 January 2007 04:11 PM   [ Ignore ]   [ # 30 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  183
Joined  03-21-2006

This is the chunk for the “case_study” weblog that is being pulled. 

<ul class="work">

                        
{exp:weblog:entries weblog="case_study" limit="10" pageinate="bottom"}
            
                               {if count
!= "1"}<li class="divider"></li>{/if}

                
<li class="work-col-ab-a">
                    <
ul>
                        <
li><a href="{client_url}" target="_blank" title="{title}"><img src="{client_image}" alt="{title}" /></a></li>
                                                
{if case_study_yn == "Yes"}<li class="case"><a href="{url_title_path=work/case-study}" title="{title}: Case Study">Case Study</a></li>{/if}
                    
</ul>
                </
li>
                <
li class="work-col-ab-b">
                    <
ul>
                        <
li><span>Client:</span>

                            <
ul>
                                <
li class="client"><a href="{client_url}" target="_blank">{title}</a></li>
                            </
ul>
                        </
li>
                        <
li><span>Services:</span>
                            <
ul>
                                 
{exp:php} ob_start(); {/exp:php}{development}{exp:php} if(strpos(ob_get_contents(), "Web Design")!==false): {/exp:php}<li><a href="http://www.re-volvemedia.com/services/development/web-design/">Web Design</a></li>{exp:php} endif; ob_end_clean(); {/exp:php}
                                 {exp
:php} ob_start(); {/exp:php}{development}{exp:php} if(strpos(ob_get_contents(), "Web Design")!==false): {/exp:php}<li><a href="http://www.re-volvemedia.com/services/development/e-commerce/">E-Commerce</a></li>{exp:php} endif; ob_end_clean(); {/exp:php}
                            
</ul>
                        </
li>
                    </
ul>
                </
li>

Hope this is helpful.

 Signature 

http://www.sethaldridge.com/

Profile
 
 
Posted: 18 January 2007 04:27 PM   [ Ignore ]   [ # 31 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

Alright, i tested it on my end and you need to restructure the ob_end_clean() like this:

<?php ob_start(); ?>{checkboxes}<?php $str=ob_get_contents();ob_end_clean(); if(strpos($str, "three")!==false): ?><a href="http://www.re-volvemedia.com/services/development/web-design/">Web Design</a><?php endif; ?>

Also, I don’t know what the {exp:php} tag is, so that may or may not be breaking it?

 Signature 

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

Profile
 
 
Posted: 18 January 2007 04:30 PM   [ Ignore ]   [ # 32 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  183
Joined  03-21-2006

That is a plug-in I just downloaded it is supposed to let you use PHP in templates that don’t that the option set for the template.  When I set that option it caused the page to break.  it adds “<?php” and “?>” to the beginning and end and allows you to run PHP code without having to give the permissions to the template.

 Signature 

http://www.sethaldridge.com/

Profile
 
 
Posted: 18 January 2007 04:59 PM   [ Ignore ]   [ # 33 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  183
Joined  03-21-2006

Mark,

That worked perfectly.  The {exp:php} tags did not work however, but for some reason when I tried giving PHP the permission to run it worked fine! smile

Would this work?

{if count > 2} PHP Code with 3px fix for IE6 {if:else} PHP Code as is {/if}

 Signature 

http://www.sethaldridge.com/

Profile
 
 
Posted: 18 January 2007 05:03 PM   [ Ignore ]   [ # 34 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

without any context i don’t see why it wouldn’t seth.

 Signature 

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

Profile
 
 
Posted: 18 January 2007 05:18 PM   [ Ignore ]   [ # 35 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  183
Joined  03-21-2006

It does work I just have to figure out the logic to say:

If the count is above 2 use this code on all that go above 2.

What it is currently doing is applying it to all if it is above 2.

Edit:

I think the count is acting differently than normal.  Normally when you use {if count > 2} anything after 2 would be displayed with the specified style, however with this it is counting the total number and then if it is greater than 2 it is applying the style to all displayed?

 Signature 

http://www.sethaldridge.com/

Profile
 
 
Posted: 24 January 2007 08:02 PM   [ Ignore ]   [ # 36 ]  
Summer Student
Total Posts:  26
Joined  10-24-2005

Love the extension ... and everything you do.

I have it working for custom weblog fields, but I’m wondering if there is a way to use this for custom profile fields, as well? It’d make a project I’m working on become remarkably simple.

Thanks in advance for any thoughts.

Be well,
Michael Cage

 Signature 

Aggressive Small Business Marketing + Subversive Entrepreneurship / an EE site

Profile
 
 
   
2 of 6
2
 
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: 64553 Total Logged-in Users: 28
Total Topics: 81156 Total Anonymous Users: 15
Total Replies: 436586 Total Guests: 197
Total Posts: 517742    
Members ( View Memberlist )