Custom Filter Request



  • I need 2 custom filters on which users are connected to each other.
    Can you confirm if there are these in the version 4?
    How are they set / implemented?



  • Hi, the filters you see on http://www.jabbercam.com/nextversion/ (Location: Paris/London and Looking for Dating/Just Talk) are completely customizable:

    $CUSTOM_FITLER_1_ENABLE = true;
    $CUSTOM_FILTER_1_LABEL = "Location";
    $CUSTOM_FILTER_1 = array("paris"=>"Paris", "london"=>"London");
    $CUSTOM_FILTER_2_ENABLE = true;
    $CUSTOM_FITLER_2_LABEL = "Looking for";
    $CUSTOM_FILTER_2 = array("dating"=>"Dating", "justtalk"=>"Just Talk");

    *enable/disable the filter and edit/change the labels, options



  • So, can these variables be set on another webpage of mine and passed using PHP?
    Also how do I disable so that the user CAN'T select the options for Age, Gender etc?



  • Since they are simple variables in config.php, you can post a different value from any website (change config/functions a bit to accept post-data).

    Simply use the visible="false" width="0" height="0" attributes for hiding filters.



  • @'JabberCam':

    Hi, the filters you see on http://www.jabbercam.com/nextversion/ (Location: Paris/London and Looking for Dating/Just Talk) are completely customizable:

    $CUSTOM_FITLER_1_ENABLE = true;
    $CUSTOM_FILTER_1_LABEL = "Location";
    $CUSTOM_FILTER_1 = array("paris"=>"Paris", "london"=>"London");
    $CUSTOM_FILTER_2_ENABLE = true;
    $CUSTOM_FITLER_2_LABEL = "Looking for";
    $CUSTOM_FILTER_2 = array("dating"=>"Dating", "justtalk"=>"Just Talk");

    *enable/disable the filter and edit/change the labels, options

    So how could I set my town as London and only speak to people from Toyko?



  • @'matthewfelgate':

    @'JabberCam':

    Hi, the filters you see on http://www.jabbercam.com/nextversion/ (Location: Paris/London and Looking for Dating/Just Talk) are completely customizable:

    $CUSTOM_FITLER_1_ENABLE = true;
    $CUSTOM_FILTER_1_LABEL = "Location";
    $CUSTOM_FILTER_1 = array("paris"=>"Paris", "london"=>"London");
    $CUSTOM_FILTER_2_ENABLE = true;
    $CUSTOM_FITLER_2_LABEL = "Looking for";
    $CUSTOM_FILTER_2 = array("dating"=>"Dating", "justtalk"=>"Just Talk");

    *enable/disable the filter and edit/change the labels, options

    So how could I set my town as London and only speak to people from Toyko?

    $CUSTOM_FITLER_1_ENABLE = true;
    $CUSTOM_FILTER_1_LABEL = "Location";
    $CUSTOM_FILTER_1 = array("paris"=>"Paris", "london"=>"London",  "tokyo"=>"Tokyo");
    
    ```* clear your browser's cache and Shift+Reload the page!


  • Does this require me to buy and/or use Adoble Flash Builder 4?
    I mean, do I need to recompile with these type of changes?



  • No, just change config.php



  • @'JabberCam':

    Since they are simple variables in config.php, you can post a different value from any website (change config/functions a bit to accept post-data).

    Simply use the visible="false" width="0" height="0" attributes for hiding filters.

    Where exactly do I set visible="false" to get rid of the age selection, "International" selection?





  • @'JabberCam':

    You have to edit and re-compile the source code: http://www.videosoftware.pro/forum/THREAD-Some-basic-and-frequently-asked-editing

    You just told me above it can all be done in the config.php file without the need to re-compile the source code.



  • If you are asking two different things, you should expect two different answers.
    First answer was related to the custom filters, where you don't need to recompile the source, the second answer was to this question: "Also how do I disable so that the user CAN'T select the options for Age, Gender etc?"



  • 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


 

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