Dot NET
Hi all,
I am looking for a forum to add to my site. My site is being developed in .NET with C# MVC Razor.
I was wondering, is it possible to connect vanilla forums to my .NET application? I know that there is a jsConnectdotNet repo on Github, but would like to know if anyone has had experience with this.
My goal is to use the forums, but importantly, use the underlying functionality to build my user profiles upon. I would like to make use of Vanilla's friends, messaging and other services in a custom profile, so I need to be able to plug into these features and add/retrieve/remove data.
I have obviously looked into solutions based more around my sites platform, ie, MVCForum and Yet Another Forum, but have had a lot of trouble with integrating the memberships while using a CMS. For example, if I do my own custom site implementation and use the membership provided by the 3rd party forums (in my case MVCForum and YAF), this is possible. However, when I use a CMS like Orchard, I find that one membership fights another, making it near impossible to have an integrated membership system.
I'd like to use a CMS, like Orchard and so I would also like to have users sign into my site and also be signed into the forums. I don't want users to have to register twice (once on the site and once on the forums), nor do I want them to have to sign in twice.
Any advice would really be appreciated.
Comments
jsConnect can do that. This doesn't come up that often, but does occasionally. Search the forum.
grep is your friend.
Thanks. So, by hosting my .NET application alongside Vanilla, I will be able to do things like add a user, sign a user in, access profile information and modify it, all via the Vanilla API?
jsConnect just handles SSO, user creation, and role syncing (if the correct information provided).
The API you are talking about is for 2.2, which is not out yet.
grep is your friend.
If the user is signed in you can use ajax to fetch modules and views of the profile. Using the "Standard API" currently.
grep is your friend.
Cool, thanks. Any chance you know when 2.2 will be out?
Great, so I can create a user from my .NET application, sign them in, and then use AJAX and the standard API to populate my user profiles + modify them? Sounds like a solution.
You are fetching raw information, like view fragment and json. You will need to include additional resources to make it work.
The standard API is not really for atomic operations with models. It uses the exact some controllers and urls schema as normal Vanilla requests, just with different request method and type. There is no API key, and most form/post require a transient key (nonce), which not available except from a full page request, which would be crude to scrape.
The API app for 2.2 is for those atomic operations. 2.2 is not yet beta.
I have to ask though what sort of information, do you really need to transfer, and why duplicate it?
You could embed the vanilla profile in another. Most forms the form filling, and preferences could be handled through popups.
I think people have a somewhat romantic notion of integrations between frameworks and come up with nonsense words like "bridge". The reality is not like that. Each integration is different and requires some coding knowledge.
grep is your friend.
Well, since my site has no profile for users, no notion of "friends", no private messaging ect, nor does it have a forum.
So, I would like to add this functionality to my site, without having to reinvent the wheel. It will take a long time to develop all these components and having an opensource implementation at my disposal is attractive because of the cut in development time, as well as the confidence in code that an opensource community brings.
So, what sort of information? Basically, user profiles (name, location, avatar), friends (add/remove/list), private messages (sent, received, send, delete, reply ect) and of course, forum info: number of posts, link to posts, age of post, ect.
I have seen the "Simple API", is that the same as the "Standard API"?
What are your thoughts?
Why not use the vanilla profile as the base? No need to replicate this in .NET.
Simple API is for the vanillaforums.com customers. It is not part of self hosted OS version.
If you want to retrieve information from vanilla from their profile you can use the standard API. It is not really suitable for manipulating models.
grep is your friend.
I would usually consider using the profile 'as is', but i need to remove some features, add some new ones and so am really just after 'some' of the features of Vanilla. Because of this, i need to be able to load profile info into my custom views, but also allow users to edit their profiles. By the sounds of things, Vanilla is not really going to work for me. Thanks very much for your help, i really appreciate it. also, if you have any suggestions about alternate solutions, i'd love to hear them!
The standard api involves changing the request method on the controller.
For example, the logged in user's profile is found at
http://forums.example.com/profile
. This renders the entire site. Requestinghttp://forums.example.com/profile.json
will give you all the data set on the profile controller in a JSON object.If you are pulling in data like this, you can pick and choose what you want to display.
Using the
.json
request method is quite convenient and prevents scraping. You just find the page you want the data from, and append.json
to the controller part of the URL.Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Vanilla is built on an extendible framework, why not add the features you want with that?
grep is your friend.
That is fantastic. However, am I able to make requests so that a user can, for example, edit their profile (the parts supplied by Vanilla)? The user will need to be able to modify things like their avatar, add friends, remove friends, etc.
Well, I thought that it is not really practical because, "It is not really suitable for manipulating models." and so I would have a difficult time modifying profile information.
I meant the externally through the API.
If you are extending the profile, you can do what you want. You just add the feature that you want to the profile with a plugin. If you add information through
->SetData
, that information will be available in json form too.grep is your friend.
I think you are trying to make the tail wag the dog. Like you said vanilla is the one with all these features. So why drive from the back seat?
grep is your friend.
The standard api is read only. You can just POST the html form directly (you request the view to get the transient key and form elements, fill out your data and submit the request).
If you want a write-API you will have to write your own for the specific models you want to interact with or use the vanilla-api application by kasper which requires an alpha version of vanilla atm.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.