Creating Joomla Accounts outside of a web interface - joomla

Is it possible to create a Joomla account outside the web interface. I want to create one from my Java application. If so can you give me an idea about the best way to do this?
These are my thoughts so far:
1. Create a php page that inserts the data directly into the database (but is there more to an account than simply the users table).
2. Posting the data to the register page (but will it then detect that I am not using the web interface)

Yes, it's possible. You can:
Use php to achieve it, inheriting from JUser class like explained in this thread;
Create a component using JUser in you Joomla installation, and use xml-rpc to register users using this component by calling a service from you Java application.

Related

Customized look on first login

I'm working on a java Spring webapp. There is requirement that each user will have possibility to customize the webapp look & feel. I'd like if the user will see the customized look, even on his first login. How would you do that?
My ideas are for the time being
multiple contexts(per customer), but it is not dynamic
send user a link with some attribute, then set the custom info to cookies
in Spring I can possibly create some path variable (#RequestMapping(value = "/{customerId}/login"))
just create universal login page, which will be not customizable
How would you achieve that?
If you want to offer customized looks to every user, you can use use Portlets. Spring also supports Portlet development.
You can give separate URLs to each user, could be using sub-domain or url parameters. Then fetch the request URL in your handling page to deliver specific look-n-feel.
You could also try to explore GrooveUI, which is a third party tool that allows you to define website theme based on access URL.

what is the correct approach in order to host / integrate / show my existing MVC3 project inside orchard?

I've an existing MVC3 project that implements a certain functionality, this project has it's own views, and a separate Database.
now I'm required to use the same functionality inside one of my orchard project,so I thought that I can host this solution in somewhere and view it inside an iframe or something.
Am I thinking right?,
is this the correct step to take in order to achieve this requirement inside Orchard?
to make it more clear, all I need to do is to view this solution and interact with it's controls and views from a hosting page inside orchard, and the subsequent requests should be handled by my solution in order to hit it's own data store and get back with the requested data in order to be displayed to the user.
any help would be appreciated.
Update:
thanks for Bertrand Le Roy for his answer, I can now view my solution inside my
orchard website.
I came in to one more HUGE problem, which is that my application can no longer connect to my external database.
I've a DB that is hosted in some where else, and I'm using EntityFramework to deal with it.
the problem is that if I put the connection string inside my module web.config, or main orchard web.config, I run into several types of errors like:
"System.Reflection.TargetException: Object does not match target type."
or
"System.Data.MetadataException: Unable to load the specified metadata resource."
My question is: How could I pass my connectionstring correctly to my solution, assuming that I'm using Entity framework as my ORM.
Many thanks.
You will need to put it into a module.
You will have to move route definitions to a Routes.cs file (look at any existing such file for examples).
You will also need, in order to access your data store, to opt out of the ambient Orchard transaction around the data access code (using (var scope = new TransactionScope(TransactionScopeOption.Suppress))).
If you are using dependency injection, you may have some work to move that to the Autofac-based way of doing things in Orchard.
If you want your work to appear seamlessly in the Orchard admin, you may want to decorate your admin controllers with the Admin attribute. If you want your front-end to use the current theme, you'll have to add Themed attributes and maybe refactor your views so that they only emit HTML for the content zone instead of for the whole page.
Add a manifest (module.txt) to your module folder and you should be good to go.

Dynamics CRM Managed Solution Add Customer Set Parameters

I'm creating a solution which will be released as a managed solution for Dynamics CRM Online.
However, the customer will need to put information in when installing the managed solution to allow interaction with outside services.
For example, when you install the LinkedIn solution, you need to add your log in information to allow the CRM to access your LinkedIn account.
How do I add these parameters to the a solution, and then allow the customer to update them if they change?
Cheers
Edit:
To add to my query and following the answer below.
To make sure the process is correct in my head.
Option 1.
I will create a custom entity for storing key/value, or username/password combination.
I would then create a customisation page for the solution using html web resource, which when submitted, javascript would create a single record to hold those values.
I then need to link every record that needs the values stored in the custom record - I'm not sure how this would be done without editing a workflow after the storage record has been created, to link each normal record to the storage one.
Option 2.
Create an xml web resource that stores the values. Create the html/javascript resources to update this using the configuration page.
I can then use a javascript function to obtain that data when the custom entity is created, perhaps to populate hidden fields for storage and use behind the scenes.
I can't find any tutorials on getting started with using xml in this way - can you point me in the right direction?
I typically create a "Configuration" entity that has Name/Value attributes. This is also useful when you have Dev/Test/Prod environments that require different configs (e.g. URLs, credentials, etc).
Another approach is to using Plug-in configurations or Web Resources to store that type of information. The Plug-in configuration is pretty straightforward if you can have the customer use the Plug-in Registration tool to modify the value.

how can manage session on different web application from one website in mvc

I am working on classified ads project this project consist on 3 different solutions (website)
in Visual studio 2010
1. Classified Ads (main project include all type of ads)
2. Property Ads ( for property ads)
3. Auto-mobile Ads (for Auto-mobile Ads)
I have manage all login and session management in main solution (1.Classified Ads)
so now I want to manage session for other two solution (2,3) on the base of main solution (1)
mean if user login from main solution (website) then user can access other two solution with this session that I created in main website.
How can I do this? and what will be best solution to manage these different website ?
Asp.net Session is working only for one user inside single application. So there is no built-in way to do that.
I suppose that you can use SqlServer Session State and dig ASP.NET table structure in database. Base on that knowledge it could be possible to manually relate IIS to the same table records. Anyway it is very tricky way and there is no proof that it will be working in a future (table structure could be changed but asp.net developers in any time)
Edited
BTW you can implement your own session provider - this way you will always know what and where located and how to deal with it.
Here is a small example of custom session provider implementation
http://msdn.microsoft.com/en-us/library/ms178588.aspx
And here is another one (you can download the source code there via Download Class File link)
http://www.sharepointsecurity.com/sharepoint/sharepoint-development/building-a-custom-asp-net-2-0-session-state-provider/

Joomla CMS and Spring Framework

I want to create a Web application by combining Joomla CMS with Spring Framework. What would be the best way to build/use a single sign-on for both?. All the pages on the website will be serviced by Joomla CMS, but those that require authentication/authorization will be done with Spring Framework. The later will retrieve widgets from Joomla CMS to ensure the same User Interface.
I would appreciate any suggestion or pointer to information about this topic
Thanks
Peter
You can overload Joomla User plug-in, save/edit/delete/login/etc. This will hep you understand user event that you will need to implement, http://docs.joomla.org/Reference:User_Events_for_Plugin_System. Also look at the following file plugins/user/example.php
In my opinion, mixing 2 different languages PHP and Java in 1 project is a little extreme. I would keep the projects separate and created my own Joomla/Spring Field API. Then would make API call in Joomla components/modules/plug-ins to integrate with Spring Framework.
Another thing, do not modify Joomla's native code to achieve what you want (I mean don't rewrite base classes that Joomla uses). Instead create your own library in the /libraries/ directory and extend the classes. If you decide to adopt API, you might want to have some API object in your model. Create your own base model /libraries/your_lib/application/component/ then when you are creating a model in the component change the import code to jimport('your_lib.application.component.model')
IOPLEX sell a Java library (Jespa) to provide single signon using Windows NTLM credentials, they also have a Joomla plugin. Could be appropriate if you're authenticating against ActiveDirectory and have Windows clients.
i think using web service will give the chance to not touch the basic code of joomla because joomla give you hand to make an xmlrpc , and you have to keep in mind the session controle the best think is to let joomla manage session and creating a user plugin to make a specifique action in the login and logout event. hope will help.

Resources