Custom Filter Request



  • In the above example how can I pass in the custom filter "Location" as "London" using PHP



  • How can I set the default custom filter for the user to "London" and to the other person filter as "Tokyo"???



  • Just make London first, partner will have London first too:

    $CUSTOM_FILTER_1 = array( "london"=>"London", "paris"=>"Paris", "sanghai"=>"Sanghai", "rome"=>"Rome", "moscow"=>"Moscow", "tokyo"=>"Tokyo", "anyother"=>"Any Other"); // option list (text)
    
    ```* don't forget to clear your browser's cache and reload the browser to see the changes


  • Cool.

    However if would be really great if I could set user default to "London" and partner default to "Tokyo" - how could we achieve that?

    As it is really critical to my use of the software. :D



  • This is not possible at the moment since the filter has the same array for the user and partner.
    You can still achieve the above by using the second custom filter as cities too (use different value and same name) and by hiding the Looking for part of the first and I am part of the second filter using the visible="false" attribute. Example:

    in config.php

    $CUSTOM_FILTER_1_ENABLE = true;			// 'true' or 'false'
    $CUSTOM_FILTER_1_LABEL = "My Location";	// any label (text)
    $CUSTOM_FILTER_1 = array("london"=>"London", "paris"=>"Paris", "sanghai"=>"Sanghai", "rome"=>"Rome", "moscow"=>"Moscow", "tokyo"=>"Tokyo", "anyother"=>"Any Other"); // option list (text)
    
    $CUSTOM_FILTER_2_ENABLE = true;			// 'true' or 'false'
    $CUSTOM_FILTER_2_LABEL = "Partner Location";	// any label (text) 
    $CUSTOM_FILTER_2 = array("tokyo_p"=>"Tokyo", "london_p"=>"London", "paris_p"=>"Paris", "sanghai_p"=>"Sanghai", "rome_p"=>"Rome", "moscow_p"=>"Moscow", "anyother_p"=>"Any Other");  // option list (text)
    
    

    JabberCam_x.mxml
    find:

     <mx:hbox width="100%" horizontalalign="center"><mx:vbox visible="{CustomFilter.customFilter1Values != null &amp;&amp; CustomFilter.customFilter1Values.length > 0}" id="customFilter1PC"><mx:label color="#FFFFFF" text="{CustomFilter.customFilter1Label}"></mx:label></mx:vbox> 
    	 <mx:vbox visible="{CustomFilter.customFilter2Values != null &amp;&amp; CustomFilter.customFilter2Values.length > 0}" id="customFilter2PC"><mx:label color="#FFFFFF" text="{CustomFilter.customFilter2Label}"></mx:label></mx:vbox></mx:hbox> 
    
    ```and replace with:
    

    <mx:hbox width="100%" horizontalalign="center"><mx:vbox visible="false" width="0" id="customFilter1PC"><mx:label color="#FFFFFF" text="{CustomFilter.customFilter1Label}"></mx:label></mx:vbox>
    <mx:vbox visible="{CustomFilter.customFilter2Values != null && CustomFilter.customFilter2Values.length > 0}" id="customFilter2PC"><mx:label color="#FFFFFF" text="{CustomFilter.customFilter2Label}"></mx:label></mx:vbox></mx:hbox>

    than find:
    

    <mx:hbox width="100%" horizontalalign="center"><mx:vbox visible="{CustomFilter.customFilter1Values != null && CustomFilter.customFilter1Values.length > 0}" id="customFilter1C"><mx:label color="#FFFFFF" text="{CustomFilter.customFilter1Label}"></mx:label></mx:vbox>
    <mx:vbox visible="{CustomFilter.customFilter2Values != null && CustomFilter.customFilter2Values.length > 0}" id="customFilter2C"><mx:label color="#FFFFFF" text="{CustomFilter.customFilter2Label}"></mx:label></mx:vbox></mx:hbox>

    <mx:hbox width="100%" horizontalalign="center"><mx:vbox visible="{CustomFilter.customFilter1Values != null && CustomFilter.customFilter1Values.length > 0}" id="customFilter1C"><mx:label color="#FFFFFF" text="{CustomFilter.customFilter1Label}"></mx:label></mx:vbox>
    <mx:vbox visible="false" width="0" id="customFilter2C"><mx:label color="#FFFFFF" text="{CustomFilter.customFilter2Label}"></mx:label></mx:vbox></mx:hbox>



  • Ah its a shame it can't be done with 1 filter.
    But anyways, if this can work then it's fantastic.
    These <mxhbox ..="">changes require a recompile using Flash Builder, right?</mxhbox>





  • I get Errors:

    Description Resource Path Location Type
    identifier 'customFilter1C' used more than once. JabberCam_h.mxml /4.3_2/src line 124 Flex Problem
    identifier 'customFilter1Setting' used more than once. JabberCam_h.mxml /4.3_2/src line 126 Flex Problem
    identifier 'customFilter2C' used more than once. JabberCam_h.mxml /4.3_2/src line 128 Flex Problem
    identifier 'customFilter2Setting' used more than once. JabberCam_h.mxml /4.3_2/src line 130 Flex Problem





  • Anybody who could make these changes and a few more for me? (for a fee of course)


 

Looks like your connection to H7 was lost, please wait while we try to reconnect.