How to share users data between multiple subdomains in joomla? - joomla

Today I came across following situation
I have a joomla and jomsocial site (http://www.mydomain.com) hosted on server. It has several custom (third party) components installed on it.
Now I want to upgrade this site to latest version of joomla and jomsocial. Hurdle is some third party components are not yet compatible with the latest version.
So I am planning to host these components on subdomain (http://mycomponent.mydomain.com)
Now the conditions I have are
User must be same for both the site.
If user logs in to main site and then opens subdomain (using link provided on main site), he should be logged in to subdomain and vice versa (i.e. Single Sign On)
Database can be different for both sites.
I am not getting a idea, how to proceed with this. I am thinking about using web services to communicate with main site.
Any suggestions or links to guide will be appreciated.
Thanks

There are Extension on JED which provide Single Sign On functionality to joomla. If they work may depend on your versions of Joomla...

Related

Joomla friendly URLs not working after update?

Hi and thanks for reading&answering my question. I am fairly new to Joomla,however I have built a directory website and started to put some content. I have created the standard pages(contact us, privacy etc) and added businesses. I would like SEO friendly URLs so I set Search Engine Friendly URLs, URL Rewriting --YES, and Suffix --No. However, Joomla somehow rewrites my alies and change them. example: mywebsite/bar-and-dinner is displayed now as my website/bar-din-r. I contacted the support of the plugin I use and they told me that I must have had some filters on Joomla that creates such a problem. I tried to purge cache on the website & server still the same. I just updated to Joomla 4.0. Thanks in advance for your help.

Can I have a Joomla! section on my site

I have built my website using HTML, CSS and JQuery. All pages are .php and everything works the way I want it to. My business is expanding now and I need to add a log in section for my clients where I can manage all of the work I produce (photography).
Because a custom CMS is out of my knowledge of web design I have decided to learn / use Joomla! My question is will I be able to keep my existing website and have a section that is Joomla!? So the main site remains untouched but when a client goes to the login page that page and the CMS area are joomla!
I am on an Apache server and am basically not sure if I can have just part of my site Joomla! Or does it have to be 100% Joomla!?
If I cannot have just part of my the site built in Joomla! Then there is no point in me learning it. I will have to outsource the design of the CMS. Just don't want to waste my time learning Joomla for no reason.
Joomla will happily coexist with your existing website but will likely need to be installed into a folder to avoid same file name conflicts (e.g. index.php).

Laravel 5 subdomain sites hosts as new project or not?

I have this issue where I cant decide what's for what and what is the best. Hope someone could provide me with some explanations to clear up my confusion.
So here it is, I have a site which is quite large. Currently running on Yii Framework which I am in the process of migrating it to L5 Framework. This website has several sub sites structure like below example:
1) www.example.com
2) www.example.com/{username}
3) explore.example.com
4) explore.example.com/{organization}
5) connect.example.com
6) coin.example.com
7) m.example.com
8) e3.example.com
So the current hosting method is using 1 project to host everything. Here comes the problem, should one of the sub sites were to be disabled for whatever reason, the whole website would need to be put to a stop, code to disable the site and the deploy the entire site again.
Back to L5 Framework, I noticed that I can do the same in laravel aslo to host everything in one project using the following routing methods in routes.php:
Route::group(['domain' => '{account}.myapp.com'], function()
{
Route::get('user/{id}', function($account, $id)
{
//
});
});
Again the same question rises, if there is a sub site to be disabled, I would need to code the disable site and redeploy the whole site again. So I was thinking if it is practical to host each sub sites in a new project as a module such that if any changes to that sub site, it will only affect that particular module while the others maintain running.
Additionally I would also like to ask, if I host it as a separate project, my website requires the user to login before they can navigate to any of the pages or application. So how do I tell the other modules where the user has been logged in and everything can be proceed as usual?
Finally of course if anyone have any other suggestions or approaches feel free to enlighten me too. My main motives are to achieve:
1) Maximum development flexibility
2) Fail tolerance
3) Sub sites can share the same login with the main website
(You are only require to login at the main page and you will be authorized
to use the rest of the web application)
Thank you.
I guess, the answer will be too late. Nevertheless, it might help someone else.
Today I faced a similar dilemma myself - should I use subsites or separate applications for public site and admin site of my application.
At first it seemed that I should have separate apps to avoid bringing down bith sites if I wish to upgrade just one of them. But I did not want to duplicate all the Laravel boilerplate code all over again in my repository.
Then it came to me that actually I can implement everything as subsites, but I can deploy the Laravel app to multiple subdomains. Thus there will be single app in the repository, but I'll have a different copy for each subdomain.
Drawback - the code of controllers, views (and some site specific models) will be duplicated for each deployed site. That's not an issue for a small site - just a bunch of unused files. But if I wanted a clean solution, I could implement some modular structure and bring in site-specific MVC stuff during deployment. That's another topic, I guess. There are some 3rd party solutions for modular Laravel apps. Of course, modular solution adds to the complexity and maintenance, therefore I have nothing against file duplication on server, if that's not an issue for you.
Regarding authentication - I haven't tried it with Laravel, but I have experience with implementing cookies for top level domain in pure PHP application. Essentially, you can configure your session cookie to be effective for all subdomains, and then users will have to log-in just once in any of your sites. Here seems to be a working solution for Laravel:
Persisting sessions across subdomains in Laravel 5
Just set the top level domain to .example.com and theoretically you should be good to go. For development purposes, I'd store this value in .env, though.

Add static javascript to every page of joomla

Im completely new to Joomla development. I need to develop Joomla plugin that adds static javascript to the footer of all the pages of a Joomla site. Also, the plugin would need to save 2 fields in database, and access these fields on per page basis. Also, Admin panel is needed.
Now, my questoion is, where do i start? Joomla plugin development is a big task, so if I can get some pointers as to where to start, it would be very supporting.
Im not asking for direct code, but just the right direction to start.
Thanx in advance....
Joomla has three types of extensions (what you refered to as plugin): components, modules and plugins, where each has a different purpose.
If you need to add javascript to all pages, the best place is your template. If you don't have access to template, just building an extension, then you have to create a content plugin.
If you need to create extension with admin panel which also works with database, you need to create a component. The best place to get started is tutorial Developing a MVC component for Joomla 2.5

Is there a way in Joomla to have public user profiles?

I installed Joomla 1.7 and I noticed that you can have user profiles with the user profile plugin. However, is there a way to publicly access a user's profile (without loging in)?
For instance, I noticed that you can go to:
/index.php?option=com_users&view=profile
However, that seems to pull up my own profile, If I am logged out it always redirects you to the login form. I have tried adding additional variables like "id=1", "user_id=1", or "userId=1".
Is there a way to do this? Or will I have to develop a component to pull in this information publicly?
Even though it not possible with clean Joomla website a lot of useful code come with it, which you could include to your component if you prefer to create one.
But... there is a great extension Community Builder with a great team behind it. Having used it in the past, I would highly recommend it as a solution for community based sites.
It changes the login form to a much better & bug-free form, enables more fields to be created for registration, and allows special pages for individual users, plus, community builder has extension-specific plugins.
EDIT: This answer needs an update as since it was added more extensions have been introduced like JomSocial or EasySocial. I cannot recomment CommunityBuilder any more
This post is tagged with Joomla 1.7 however I wanted to mention that if using Joomla 3.7.4 you now have the ability to show the User Profile plugin data from the core Contacts component. You can also add more custom fields to the Users component and they will also show from the Contacts component. You can set the display of the Users Profile info by going to the Admin panel -> Contacts -> Options. Turn on the option under; Contact -> User Profile -> set to "Show".

Resources