Filter Question

  • Hi,

    Loving the customization of this software. I was wondering if anyone can possibly guide me in the right direction to make partner results a bit more privatized?

    Is there a way to pass filters through $_GET? Like, if I wanted to connect to people who were only at index.php?filter=awesome, ($_GET['filter']), how could I tell the Flash file to do this?

  • Yeees, it is not that simple, you may need some knowledge of actionscript. Take a look how the username/partnername is passed to the Flash application, using the login.php sample, or this post:

  • Trying to figure out how the actionscript works.

    The problem with this function is that it only checks based on two $_GET variables, specific to the browser of 1 user.

    I feel like if I want to be able to do this, I need to store the "awesome" variable for that particular session (user) into the database. Then, when the RVC is finding a new partner, it checks a new sett_name or whatever in the preferences table (ex, cflt3) and makes sure that the partner also has "awesome" in their customfilter3 column.

    How is the RVC reading user prefs and inserting user prefs? It looks like it's in functions.php. Is there a basic way of writing something that checks an additional sett_name? I had trouble deciphering which part of functions.php was used in the random finding process.

    To put it simply, I want a way to add a new preference in user_prefs, and write an SQL statement that matches the current user with another user who has the same thing in the new preference.

    Also: What's the difference between user_settings and user_prefs? They both seem to hold similar information, but one is more recent.

    Ah, looks like it's being passed in

                var settings : Array = ["sex", mSex=="b"?"0":mSex, "age", age.value, "cam",
                	cameraAllowed?"true":"0", "lang", langSetting.selectedItem.code == null?"0":
    				langSetting.selectedItem.code, "uname", myUsername.text];
    			var prefs : Array = ["sex", mFilterSex=="b"?"0":mFilterSex, "age", lookupAge.value, "cam",
                		cbCameraOnOnly.selected?"true":"0", "lang", langFilter.selectedItem.code == null?"0":
    ```So then all I need to do is add a new element to that array, based on $_GET values. Woohoo!
    Thanks for an amazing product, Jabbercam.
    EDIT EDIT EDIT: Quick question: Does the Jabbercam code know to check prefs automatically? If I added a new preference, will it make sure my partner has the same one, even if it's not one of the default prefs?

  • Sorry, we have no time to lead trough creating a new filter (it would be much faster to create it, instead of describing the solution). If you take the existing filters all needed methods are there to create an "awesome" filter same like man/woman (man/not man).
    If you add a new function to the software, all your users will have it after a certain time. Because of browser cache, some will use the old version until their browser is loading the new flash application. To disable caching, you need to add something similar to your .htaccess file:

    # turn Expires on, default is 0
    ExpiresActive On
    ExpiresDefault A0
    # force no caching for selected files (EDIT TO FIT YOUR PREFERENCES)
     <filesmatch "\.(php|swf|js|html)$"="">ExpiresActive Off
    Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
    Header set Pragma "no-cache"</filesmatch> 

  • That's useful, thanks…kept having to manually reset my browser cache.

    Can you take a look at this code and tell me if it works for creating a new filter based on $_GET?

    			var newfilter : String = "";
    			try {
    				newfilter = url.match(/filter=(\w{3,})/)[1];
    			} catch(e : Error) {
    				newfilter = "";

Log in to reply