OpenSource Virtual Mistress Idea

This is the place for general discussions on fetishes, sexuality and anything else. What's on your mind right now?
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

Sorry about the *extremely* long wait for updates, I've been more than a little busy ;)

Hopefully will have another update out soon-ish.
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

Know how you feel, still have abouts 16 months of programming work to do :look: and right know im at the hard part where i constantly have thousands of lines of code in my head and obviously don't feel like programming even more in the little free time i have.
When i arrive some of the easy parts i will try to contribute some more code :)
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

Fair enough, I'm not sure what you think but perhaps we should redo it? With a little more planning?

I've kind of got stuff planned out in a google drawing, but it wouldn't fit in with what we've got already. I was thinking if everyone just commented what they were going to do and then push it to us *shrugs*

The plans still being developed but I think almost everything's there now, the files don't all have placeholders yet so if someone wants to try I think everything's in the drawing or files. (The database for the second project is empty, so you'd have to create the tables, please do it to the plan in the drawing so everyone can work together).

Link to the plan: https://docs.google.com/drawings/d/1L9x ... sp=sharing

Link to where I've gotten so far: https://github.com/DareSlave96/VDomina-2

I'm welcome to any more suggestions :-D
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

I am used to redo stuff, often its easier and takes less time to redo something then trying to mod and fix it.
Planning is a good idea and important to get a good core script (on wish everything runs).
I think it would also be a good idea to use comments true out scripts extensively. Ever little function should have a comment explaining what it is and what it does. It happens to me to often that when i look back at a project im staring at my screen for hours just to figure out what does what.

When i have a little time ill setup some ajax functions (different this time). That mainly run on onclick events (onclick="function(var,var,var); return false;"). That should make it a lot less confusing then links that just do ajax stuff without any onclick event.
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

you know, I've just looked back at the first example you gave of ajax and understand it better, couldnt we just have a function that goes a bit like this (extremely simplified because I can't remember the exact code) That would just load content into the body div (similar to what it's doing now).

Code: Select all

 function loadContent ( var page: string ) {    if ( page == "home" ) {        Do ajax to load home into a div with caching ( Only on the home page though ). (page could be assets/pContent.php?page=X which would just return the body content, no headers/footers etc)    }    elseif ( page == "punishments" ) {        Do ajax to load punishments content without caching ( we want it to change ).    }     Re-get number of points each time page changes. (assets/pContent.php?page=welcomeMes)} function post(  ) {    Use jquery to post info from forms and stuff to a php script which can just return JS or something back to confirm it was successful.} 
I think that makes sense, and I think the way I'm coding it at the minute makes it easier to do because I've separated out the header, footer and content into different functions. Also, would be easy to make the page in the assets folder because of this.

A question though (I think I've asked this before, how does a user that doesnt have a JS enabled browser use the buttons (or would you replace the menu with ajax links using JS so that it made sure of it ;) ? ) )

Also, let me know what you think about the above code functions, you might have a better way of doing it ;)
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

I think javascript should be a requirement, so i would do something like this.
<a href="enable_java_please.html" onclick="menufunction(var); return false;"></a>

enable_java_please.html would be a page containing some message telling people that they need to enable java (that by default only shows when they dont have java enabled).

For the java i would create multiple files.
1 core file, containing function that will be used all over the place
and 1 main file or page file.

ex:

Code: Select all

 CORE.JS // GET2DIV (ajax get with loading animation and error handling)function get2div(arraydata){    //  arraydata = target, data, div, errorclass, errormsg, cache, async, loadstyle, callback, callbackdata    ---code---}function updatepoint(var,var){        ---code---} note: core.js might/will contain very complex functions.. however you would only work in main.js.(the callback is for returning data... since var abc = get2div(blabla); would never work) ------------------------- MAIN.JS LoadContent(page){   if ( page == "home" ){         get2div([var,var,var,var]);         updatepoints();         maybesomethingmore(var);   }} 
What i also like to do is not use ajax cache at all. But instead insert and populate divs and control the visibility of them. So a function like loadpage(var); would load the page and insert it into the div only if is didnt do that already (if the page has already been loaded it simply shows it ... hide A show B).

Posts are similar to get requests... since the page content is returned... i would just return something like OK|yaay it works or KO|noo it failed :( (echo 'KO|blabla';).... then with java do a split (same as php explode) and show array[1];

A other way of loading pages is to use a hash....

Code: Select all

 // CHECK URLfunction checkpageurl(){    var page = getpage(window.location.hash);    if(page && page != lastpage){        loadpage(page);    }}window.onhashchange = checkpageurl; // CHANGE URLfunction changeurl(var, var){    ---code---   window.location.hash = current_page+hash_data;   } 
Anyways i think all are kind of easy to work with... imo it depends on preference :)
Let me know what you think, could write a working example this or next week.
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

I have added a partial complete (working) ajax code to a separate git. https://github.com/creative84/VdomTest

The core.js contains a bunch of unused code that would be used in the future..
You also wouldn't need to change anything in core.js since there are a bunch of callbacks that would let you do everything from main.js.

This setup used hashes (index.php#home, index.php#test) and sub-hashes (index.php#home&var=var) for loading page elements.
This allows for bookmarks and actual links :-D
Note: the sub-hash stuff is not fully implemented/working.

Its looks complicated but have a look at it. Its actually quite simple.

The way pages load is..... a link index.php#home loads ajax/home.php into id="home_page"...
a link index.php#text loads ajax/test.php into id="test_page"
note: this is only for the main pages... sub-content... or stuff loaded within pages.. would be done with a function like onclick="loadstuffindiv(var,var)"

The main function "get2div" takes care of everything. Errors, loading, callbacks etc.
note: add a loading image (loading.gif) to the img folder.

Let me know what you think.. will add/change a little more in the next couple of days. And when we have something we are both happy with we can implement it into the main git.
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

Looks good, haven't looked through the code yet though.

I will have to put my part of the project on hold because I'm going on holiday, I'll be back in a few weeks to carry on.

(I'll try to get on here/github at least once while away but wont be coding)
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

Have a great vacation :-D
Ill keep working on the ajax part.

Think i also figured out how to setup the geo location code.
The idea is:
- geo location on/off option
- geo location permission is requested (NOTE: also works on desktop pc with firefox)
- geo location is obtained and rounded (to about 10m)
- geo location is checked ever x seconds until the off button is clicked
- geo location is exclusively stored on the clients PC (as a cookie)
- the cookie contains the lat and long along with a location name (ex: home = 10.000,15.000)
- if a new geo location is detected (one that is not in the cookie) the client is asked for where this location is. As in are you at home, work, etc?
- the only information that is send and stored in the server is the location name. As in home, work, etc
- the stored variables (home, work, etc) can be used to influence permissions, sessions, etc

Any more ideas are more then welcome.
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

Sounds good, It would perhaps require another section called master/mistress (depending on their dominant preferences) and if they were in that section it would automatically use the geolocation alongside some custom stuff (when they're out and about) and some stuff from the sessions (when they're at home). Doing it this way will be better (especially if it's sectionised so a function returns only the orders ) because it could then easily be made into an app (just some code going get this URL, put it into an element and create a notification from it ;-) ) i think ;-)

Also, because the JS would be sending the request, you could store the info in Local Storage, which is slightly more obscure for someone who happens to look they can't just see the exact location like "This bloke lives here, lets go rob him", just an idea
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

When the geolocation is enabled permission is requested, unless its a actual app that requests it on install.
So i guess we will just leave it a website and slap on some jquerymobile at a later point.
Cant really test this since i cant instal a webserver on my phone :-P

Local Storage would be more secure, that way the server doesn't have access to the coordinates at all, unless someone mods the java code and sends those as well. So java would check and store the coordinates and send the server the location (home, work, unknown, etc).
Would be cool if it could detect if your in the bathroom as well, but doubt it would be accurate enough (unless your bathroom is a shack in the backyard :lol: ).

To the sessions we could pass a simple variable that says if geolocation is on or off (and available)... and then make the session force you to turn it on. Since people can disable gps, disallow geolocation i think that would be a better option (not to mention battery draining).

The location (home,work,etc) can be stored in a database or retrieved on the fly with ajax.

I have added a bunch of more code to git.
- View (to split up php code and html, and doing a ton of stuff before sending output)
- Lib (to load classes)
- Geolocation test code
- Ajax sub loading with groups and hashes (#home&main=points)
- etc
creative
Explorer
Explorer
Posts: 21
Joined: Fri Apr 10, 2009 9:47 am

Re: OpenSource Virtual Mistress Idea

Post by creative »

Finally finished VDomina JP Alpha 0.5 https://github.com/creative84/VdomTest
(JP stands for Javascript platform :-P)

Implementing the main code (https://github.com/DareSlave96/VDomina-2) into it should be a breeze compared to the old javascript.

Iv added a ton of things to it and made it less confusing and the layout is semi-responsive.

Let me know what you guys think. (note: that its not VDomina, its merely a JS platform for it).

If you need something light to run the code have a look at phpdesktop https://code.google.com/p/phpdesktop/
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

Hi all, still on holiday but will try to add more :-D.

I've also decided to start SexualChoc's denial challenge 2014 on monday, which may have been a mistake ;-) but who knows, we might get this done in a half reasonable amount of time :D

Any coding help appreciated though :-D or more ideas
DareSlave96
Explorer
Explorer
Posts: 32
Joined: Sat Jul 13, 2013 3:46 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: OpenSource Virtual Mistress Idea

Post by DareSlave96 »

Ok, so I know we were planning a website, but I picked up python the other day and decided to have a go.

To be honest I've gotten more done in 3 days than weeks of PHP/HTML/CSS work. And looking at it it should be easy to continue.

Sorry to Creative :-/ who I've kind of wasted the time of :-( and others. But I feel this should be easier to maintain.

So....
https://github.com/DareSlave96/PythonDominant

To use this program I would clone the repository, and add instructions locally and then push, this also makes it easier to keep up to date with instructions that others have been adding in too. Feel free to add as many as you want (especially since there are only 2 per category at the moment). You'll need Python installed on your computer too, or phone (this is untested... for now).

There's a wiki page on there that tells you how to edit the instructions (there all in text files) and if you're stuck, ask on here or open an issue.

The next two things I'm going to work on in this project are the 'Can I...' questions and using desires. Then I'll move on to getting the cum/edge/ruin instructions from a list. There also needs to be more instructions. After this I'll release it as v1.0.0 and carry on developing other features.

Wiki page with info for adding instructions: https://github.com/DareSlave96/PythonDo ... structions
User avatar
DailyTwo
Explorer
Explorer
Posts: 33
Joined: Fri Nov 15, 2013 12:10 am
Gender: Male
Sexual Orientation: Straight

Re: OpenSource Virtual Mistress Idea

Post by DailyTwo »

I checked the python one and I like it :)
although it is still alpha
Post Reply