Page 1 of 2

[solved]Search FEU Via FormBuilder

Posted: Fri Dec 26, 2008 11:58 am
by JeremyBASS
Hello, so I've run in to a dumb wall and I just can't figure out how to over come it..

this is what I have

Code: Select all


        {assign var=ISone value=''}
        {assign var=noMATCH value=''}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if $userprops.city eq $fld_39}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">company name:{$userprops.company}<br/>
            email:{$userprops.email}<br/>
            State:{$userprops.state}<br/>
            City:{$userprops.city}<br/>
            Zip:{$userprops.zip}<br/>
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            avatar:{$avatar}<br/></span><br style="clear:left;"/><hr/><br/>
            {assign var=ISone value=1}
        {elseif ($userprops.city neq $fld_39) && (isset($ISone) && ($ISone neq '1'))}
            {assign var=noMATCH value='No Matches!!!!'}
        {/if}
        {/foreach}
        {if $noMATCH  == 'No Matches!!!!'}
        {$noMATCH}
        {/if}    
so the issue is this... thought I get all the right data.. I still see 'No Matches!!!!' even if it returns stuff... now I'm sure I'm just missing something basic but how can I set this so that if there is something returned then just that stuff, but if nothing is returned then the 'No Matches!!!!'...

I'm sure someone knows... it's just not me.. lol... and I'm sure I wrote that is the most oddest hardest way I could... but that what you get for teaching your self  :D no fun...lol...  thanks for the help...

jeremyBass

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 4:18 pm
by duclet
You are getting "No Matches!!!!" because it is inside of a loop. Say for example the first item in $mymembers got into the elseif statement the first time, even if it gets into the if statement the second time, $noMATCH has already been set to "No Matches!!!!".

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 5:42 pm
by JeremyBASS
Ok.. I'm sorry. I Guess I should have Stated that I know that was the casue... I don't know how to work around it... thank you for the help thou

jeremyBass

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 7:52 pm
by duclet
I believe I have a solution for it but before I try it, what is the point of "ISone"?

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 8:30 pm
by JeremyBASS
ISone... that is my "salt"... So I think I got out of the logic loop... with

Code: Select all

            {assign var=ISone value=1}
        {elseif ($userprops.zip neq $fld_43) && (($ISone neq '') && ($ISone neq '1'))}
            {assign var=ISone value=0}
        {/if}
        {/foreach}
        {if ($ISone  eq '0') | ($ISone  eq '')}
        {$noMATCH}
        {/if}  

So that is done but... Now I know this is not pretty but it's working... it's sceaching the FEU... what I need to do is convert this into a case/switch type deal... I think that is where the help is needed now.. any ideas?

Code: Select all

<h2>Search Completed</h2>
{if isset($fld_36) && ($fld_36 neq 'No Default')}<strong>Stylist/Salon by State </strong>: {$fld_36}<br />
{assign var=State value=1}{else}{assign var=State value=0}
{/if}
{if isset($fld_39) && ($fld_39 neq '[unspecified]')}<strong>city</strong>: {$fld_39}<br />
{assign var=city value=1}{else}{assign var=city value=0}
{/if}
{if isset($fld_40) && ($fld_40 neq '[unspecified]')}<strong>Hair Stylist Name</strong>: {$fld_40}<br />
{assign var=Name value=1}{else}{assign var=Name value=0}
{/if}
{if isset($fld_41) && ($fld_41 neq '[unspecified]')}<strong>Hair Salon name</strong>: {$fld_41}<br />
{assign var=Salon value=1}{else}{assign var=Salon value=0}
{/if}
{if isset($fld_43) && ($fld_43 neq '[unspecified]')}<strong>zip</strong>: {$fld_43}<br />
{assign var=zip value=1}{else}{assign var=zip value=0}
{/if}
<h4>{$State}{$city}{$Name}{$Salon}{$zip}</h4>
<br/><br/>
{assign var=selector value=$State$city$Name$Salon$zip}
{$selector}
<br/><br/>
<br/>
{$feu_smarty->get_users_by_groupname('members','mymembers')}
<h3>Matching Members:</h3>
<hr/>
{assign var=noMATCH value='No Matches!!!!'}
{assign var=ISone value=false}
{if $selector eq '00000'}
Sorry the search form was blank
{elseif $selector eq '10000'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if $userprops.state|lower eq $fld_36|lower}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
{elseif $selector eq '11000'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.state|lower eq $fld_36|lower) and ($userprops.city|lower eq $fld_39|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
{elseif ($selector eq '00010')|($selector eq '11011')|($selector eq '01011')|($selector eq '00011')|($selector eq '10011')|($selector eq '11010')}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.company|lower eq $fld_41|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
{elseif $selector eq '10010'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.company|lower eq $fld_41|lower) && ($userprops.state|lower eq $fld_36|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}   
 {elseif ($selector eq '00100')|($selector eq '11101')|($selector eq '01101')|($selector eq '00101')|($selector eq '10101')|($selector eq '10100')|($selector eq '11100')}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if $entry.username|lower eq $fld_40|lower}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
 {elseif $selector eq '01000'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if $userprops.city|lower eq $fld_39|lower}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
{elseif $selector eq '01010'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.city|lower eq $fld_39|lower) and ($userprops.company|lower eq $fld_41|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
{elseif $selector eq '00001'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.zip|lower eq $fld_43|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}   
{elseif $selector eq '11001'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.city|lower eq $fld_39|lower) and ($userprops.zip|lower eq $fld_43|lower) and ($userprops.state|lower eq $fld_36|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}   
{/if}
<hr/>
<h1>New Search</h1>
<a href="javascript: history.go(-1)"><h1>New Search</h1></a><br/><br/> 


BTW... I didn't say... the a FEU sceach in formbuilder...

thanks for the help

jeremyBass

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 8:41 pm
by duclet
Looking at that source code, I don't see how it would ever get into the elseif block. If ISone is an empty string (which it is to start out with), it can't get into it before it fails $ISone neq ''. If its value is 1, then it fails $ISone neq 1. I also don't see where it sets it to any other value. Anyway, this is my suggestion so see if this works:

Code: Select all

{assign var=ISone value=false}
{foreach from=$mymembers item=entry}
    {$feu_smarty->get_user_properties($entry.id,'userprops')}

    {if $userprops.state eq $fld_36}
        <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
        <span style="background-color:#990000;float:left; ">Salon name:{$userprops.company}<br/>
        email:{$userprops.email}<br/>
        State:{$userprops.state}<br/>
        City:{$userprops.city}<br/>
        Zip:{$userprops.zip}<br/>
        {get_feu_properties username=$entry.username property="avatar" method="assign"}
        avatar:{$avatar}<br/></span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
    {/if}
{/foreach}
{if !$ISone}
    {$noMATCH}
{/if}

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 8:52 pm
by JeremyBASS
sweet that worked great... ... What I had was suppose to act as the true or false.. but that way I had to account for the null but... t/f... duh only two too account for... I'll put that under my hat.. :)

so I'm on my way.. I now need to make this more into a case type deal I think..

here is where am at.. any help is greatly appreciated...

thanks again..

Code: Select all

<h2>Search Completed</h2>
{if isset($fld_36) && ($fld_36 neq 'No Default')}<strong>Stylist/Salon by State </strong>: {$fld_36}<br />
{assign var=State value=1}{else}{assign var=State value=0}
{/if}
{if isset($fld_39) && ($fld_39 neq '[unspecified]')}<strong>city</strong>: {$fld_39}<br />
{assign var=city value=1}{else}{assign var=city value=0}
{/if}
{if isset($fld_40) && ($fld_40 neq '[unspecified]')}<strong>Hair Stylist Name</strong>: {$fld_40}<br />
{assign var=Name value=1}{else}{assign var=Name value=0}
{/if}
{if isset($fld_41) && ($fld_41 neq '[unspecified]')}<strong>Hair Salon name</strong>: {$fld_41}<br />
{assign var=Salon value=1}{else}{assign var=Salon value=0}
{/if}
{if isset($fld_43) && ($fld_43 neq '[unspecified]')}<strong>zip</strong>: {$fld_43}<br />
{assign var=zip value=1}{else}{assign var=zip value=0}
{/if}
<h4>{$State}{$city}{$Name}{$Salon}{$zip}</h4>
<br/><br/>
{assign var=selector value=$State$city$Name$Salon$zip}
{$selector}
<br/><br/>
<br/>
{$feu_smarty->get_users_by_groupname('members','mymembers')}
<h3>Matching Members:</h3>
<hr/>
{assign var=noMATCH value='No Matches!!!!'}
{assign var=ISone value=false}
{if $selector eq '00000'}
Sorry the search form was blank
{elseif $selector eq '10000'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if $userprops.state|lower eq $fld_36|lower}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
{elseif $selector eq '11000'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.state|lower eq $fld_36|lower) and ($userprops.city|lower eq $fld_39|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
{elseif ($selector eq '00010')|($selector eq '11011')|($selector eq '01011')|($selector eq '00011')|($selector eq '10011')|($selector eq '11010')}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.company|lower eq $fld_41|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
{elseif $selector eq '10010'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.company|lower eq $fld_41|lower) && ($userprops.state|lower eq $fld_36|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}   
 {elseif ($selector eq '00100')|($selector eq '11101')|($selector eq '01101')|($selector eq '00101')|($selector eq '10101')|($selector eq '10100')|($selector eq '11100')}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if $entry.username|lower eq $fld_40|lower}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
 {elseif $selector eq '01000'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if $userprops.city|lower eq $fld_39|lower}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
{elseif $selector eq '01010'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.city|lower eq $fld_39|lower) and ($userprops.company|lower eq $fld_41|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
{elseif $selector eq '00001'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.zip|lower eq $fld_43|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}   
{elseif $selector eq '11001'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if ($userprops.city|lower eq $fld_39|lower) and ($userprops.zip|lower eq $fld_43|lower) and ($userprops.state|lower eq $fld_36|lower)}
            <span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}   
{/if}
<hr/>
<h1>New Search</h1>
<a href="javascript: history.go(-1)"><h1>New Search</h1></a><br/><br/>  

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 9:23 pm
by Nullig

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 9:36 pm
by JeremyBASS
Thanks I have been reading those.. only thing is... ... that is not include in the core?? I guess.. So I can't just add that... I think....

I just realized another pitfall... capitalize of the input... I need to make it so that... with

$userprops.state eq $fld_36

$fld_36 which the user inputs matches the $userprops.state with out concern to capitalization...

not sure on that...


thanks again for the help

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 9:42 pm
by JeremyBASS
gosh this is the only parts that change

Code: Select all

>>>>>>>>>{elseif $selector eq '10000'}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

       >>>>>>> {if ($userprops.state|lower) eq ($fld_36|lower)}

there has to be a better way lol...



also I fixed the matching part... like this

{if ($userprops.state|lower) eq ($fld_36|lower)}


is there a better way as right now those statments get pretty long...

thanks again
jeremyBass

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 10:17 pm
by Nullig
I believe that if you copy the code from the second smarty forum posting, you just have to put it in the smarty plugins directory for it to work.

Nullig

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 10:24 pm
by JeremyBASS
I guess what I was meaning was that because it appears to not be in the directory already I am nerves to do so as I will forget to repeated that addition at some point...

it's harmless it seems... may-be it can be included in to 1.5.2??

anyways.. do you know of another way to hand this script??...

As this little bit

Code: Select all

<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
            <span style="background-color:#990000;float:left; ">
            {if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
            {if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
            {if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
            {if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}<br/>{/if}
            </span><br style="clear:left;"/><hr/><br/>
        {assign var=ISone value=true}
        {/if}
        {/foreach}
        {if !$ISone}
            {$noMATCH}
        {/if}  
is just repeated for each of the different

Code: Select all

 {elseif ($selector eq '00100')|($selector eq '11101')|($selector eq '01101')|($selector eq '00101')|($selector eq '10101')|($selector eq '10100')|($selector eq '11100')}
        {foreach from=$mymembers item=entry}
        {$feu_smarty->get_user_properties($entry.id,'userprops')}

        {if $entry.username|lower eq $fld_40|lower}
thanks again...
jeremyBass

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 11:09 pm
by JeremyBASS
well.. little by little...


($selector eq '00100')|($selector eq '11101')|($selector eq '01101')|($selector eq '00101')|($selector eq '10101')|($selector eq '10100')|($selector eq '11100')}
       
is now this

{elseif $selector eq ('00100'||'11101'||'01101'||'00101'||'10101'||'10100'||'11100')}


kind poking at t now.. lol...

any ideas

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 11:15 pm
by JeremyBASS
ok... is there a way to be like

var dothisBLOCK =
            {$entry.username}
           
            {if isset($userprops.company)}Salon name:{$userprops.company}{/if}
            {if isset($userprops.email)}email:{$userprops.email}{/if}
            {if isset($userprops.state)}State:{$userprops.state}{/if}
            {if isset($userprops.city)}City:{$userprops.city}{/if}
            {if isset($userprops.zip)}Zip:{$userprops.zip}{/if}
            {get_feu_properties username=$entry.username property="avatar" method="assign"}
            {if isset($avatar)}avatar:{$avatar}{/if}
           


???

so I could call it like $dothisBLOCK .... tried to put it into a GCB but that was a no go...

Re: dumb Logic Wall...

Posted: Fri Dec 26, 2008 11:55 pm
by JeremyBASS
ok.. I haw to return
{elseif $selector eq ('00100'||'11101'||'01101'||'00101'||'10101'||'10100'||'11100')}
back to

($selector eq '00100')|($selector eq '11101')|($selector eq '01101')|($selector eq '00101')|($selector eq '10101')|($selector eq '10100')|($selector eq '11100')}

it was not lettig some of them be true... or retuen there data...

:-\