Unifying K2 component's data-source for multiple Joomla! websites hosted in the same server - mysql

I am responsible for a few web sites of my organization.
I use Joomla! 2.5.9 for those web sites. They all are running at the same server.
I use K2 component for content managing.
I have a general website in which shows all the staff information at the 'Staff' page. Also some of those people and their contents are shown in another department's website. So, there are databases for each web site.
For example:
In the general website (let's say general.org), when I click on the 'Staff' menu item, page shows all of the people work at my organization. Also they work at different departments.
In another web site (eg: education.general.org) when I click on the 'Staff' menu item, It shows the people work at education department.
But for each web site, I have different user accounts which means a modification in one of them does not affect the other one. If the one of the education staff tries to change his profile picture on the education web site, he also has to do it on the general web site.
And sometimes one person might be working at two departments. Thus he has to edit three times of his data.
Is it possible to merge the records for all websites? In other words, I want everyone to insert/update their data on the general web site, and the other web sites will be updated automatically.

You would have to have one Joomla site to do this. The subdomains would have its own template/style or whatever, but would run on the same Joomla installation. The subdomains then just map to a specific menu item on the general page. That would be one way to do it.
Another way would involve coding a custom user plugin which updates the tables from the other Joomla installations after a profile was edited. If you're familiar with PHP you could probably do this yourself, otherwise you need someone with coding knowledge to do it for you.
Or you could set up Joomla to use authentification based on a LDAP database (http://docs.joomla.org/LDAP). However I'm not sure how well it works with password and profile changes.
That's about the solutions I would see.

Related

Multiple Website with Single Database and Different urls WordPress?

I was looking to find a solution for making clone websites of my existing WordPress website. the thing is I want to make clones of the website so if one of them will somehow get down the others will be Live. For Example The Piratebay.com they have a lot of clone sites and I you would upload a torrent to one site all of them will have the same torrent available, this is just for example purposes. I want to make a clone of my website so if I add a new post to my any clone website or the original all of the websites will have the same post available on it. For sure they will have their own domain name. The website will use MySql as the form of database. I have searched all over the internet and on StackOverflow as well and couldn't fine a solutuion
Use the same Cloud MySQL database (e.g. Googles Cloud SQL) for all websites. Install wordpress on the first domain and then just copy the wordpress folder to the other destinations (or modify the wordpress-configuration at the other destinations).
Don't use absolute paths for images in your posts etc. (not http://example.com/something/image.jpg).

Offering WP-Members and Facebook login options together seamlessly

I am starting a website and activated WP-Members for my user registration/login. This is great because I can then easily capture user_id in the MySQL table for writing my queries. But I am thinking I probably should also offer Facebook login or maybe even the Social Connect plugin as well.
The problem I'm guessing is that facebook login or any such social media login will use a different variable for user_id (such as fb_login) and so users who login this way will not be placed in the same Members table as users who login with WP-Members. Therefore, I'm not sure the easiest way to go about offering both registration methods.
Is it just too complex to do in general for a newbie to make both registration options establish users in the same table or at least make it easy for me to reference user_id for both methods when trying to run user-id conditional statements and such?
The problem I'm guessing is that facebook login or any such social
media login will use a different variable for user_id (such as
fb_login) and so users who login this way will not be placed in the
same Members table as users who login with WP-Members.
Unless a membership plugin creates and uses its own user table, all users are saved in the same table in WordPress - wp_users. Altering that would severely restrict your ability to integrate with other plugins and/or WordPress itself since you'd be trying to manage two separate user tables.
That isn't really the problem you're facing, but I wanted to mention it because in order to address your issue, your mindset has to understand the db schema you are working with.
WP-Members uses the WP db schema so that it will maintain compatibility not only with WordPress, but also with other plugins. There is not need to separate login/registration using a separate table (in fact, I'd advise against that). There are WP-Members users who use Social Connect just fine. They can be integrated because they rely on the same database.

Can Joomla and Moodle share the same database?

I know this is a hardcore programmer's site and I am more of a theorist/researcher, so bear with me with my question and my terminologies. I would like to pick your brains on this matter.
We have an existing website developed using Moodle. The website is technically a Learning Management System that grades users after each course. Now we want to make it more interactive by adding a game element to it. We will develop a tab that will redirect the users to Joomla website (which will look exactly like the moodle one) but they wont know they are on a different platform. This tab will display the users profile including his grade or at least the numerical value of his "Grades" which will be labeled as "Points". I know the numerical value of the user's Grades are stored somewhere in Moodle but is it possible for that value to be a reference of the User's points in the Joomla platform?
You will probably need to synchronise the logins between Moodle and Joomla. A "single sign on". Have a look at these integrations for Joomla.
But I would personally develop the game as a local plugin in Moodle rather than using Joomla: Local plugins - MoodleDocs.
You can share same DB for Moodle and Joomla.
But you have to keep in mind while your user details are stored in Moodles at that time you have to submit those info to the Joomla user table too.
Then you can achieve your goal. For setting up the Joomla user manually you can refer this link
Hope it make sense..
you can share the moodle website with joomla that possibly submit those user table which is acquired from moodle
Yes it is possible but make sure that user detail must be synchronized between both system tables(which has user information).

HTML: How to design profile page that is used for different users

I want to make a website for my Android social networking app and need some assistance with a basic concept regarding user profile pages. So right now I have a native Android app where users have their own profile page displaying their profile stats, e.g. followers etc. and I would like to do something similar in HTML. My question is how can I design a generic profile.html page that displays the current user's username/stats and that can be used for different users? For example, see how Facebook are using the same profile page for each user but they replace the name/bio/stats fields with the data for the current user, how is that done - at the server side (by replacing the appropriate fields with the data for the current user), or at the client side (by loading them with a separate script after the page has loaded)?
Also, I am using a Tomcat servlet to deal with the requests if anyone is interested.
Thanks for any assistance and sorry if the question is silly :)
You would have to use PHP. Think of webpages as a mathmatical equation where HTML is 3+4=12 but PHP is 3+X=12. HTML is already defined, you can't change it. Where PHP you can code the entire page but get the bio or username from a database.
But you should be warned that this is no simple task, you would have to create a large mySQL database, possibly more to handle logging in and out and use the PHP to define what you are calling for form the mySQL database.
It is possible, but not in a day.

Web application Development - Subdomain

I'm currently at the very early design stage of building a web app that will be used by companies. Each company will have many departments and each department many staff. Each department will manage its own application with staff logging onto the application.
There is the possibility that staff across different organisations will have the same staff id. For that reason, I'm thinking of going with subdomains. Each company will have its own subdomain. I've googled a bit about using subdomains and have seen a number of positives, however not too many negatives except for the SEO implications (which do not interest me really.. this app will require direct contact with each organisation.. it's very specialised)
Can anybody think of any other disadvantages to going with subdomains? Can anyone think of a better way of doing things?
Regards,
Fiona
Your login information will presumably be in a database table somewhere. You will either need separate databases for each company and will need to identify which database to use. Or you will have all users in one table, with some sort of company id - and you will need to determine which company id to add to your login query.
You can make either of these determinations based on subdomain, or on a company-specific login page, or directory, or you can ask them to pick which company they want to log in to (which would be pretty ugly).
Subdomains should work fine. You'll have to do DNS setup every time you add a company, or work out some apache magic. You may need SSL certificates for each subdomain (I think - I'm not well versed on those). Other than that, I don't see any big disadvantages or advantages as far as code or architecture go. Marketing may have a stronger case for one over the other.
You'll still want to use other methods of making sure that users don't have access to other companies' data, especially if other subdomains are guessable.
We also have a multiple-company application, but decided to make all logins unique. This makes it a little easier for us to identify users uniquely at the expense of occasionally having to explain why some username is not available even though that user's company isn't using it.
using sub domains is a good idea, the only concern i have is regarding the authentication of the users. I am a .net guy so i am bringing up this query, i am not sure if you are using asp.net for your development. In case you are using asp.net for developing this website and you are using the asp.net membership, profiles and roles for authentication and authorization, you would end up having security problems. Because a user after logging into http://abc.site.com would have access to the site http://xyz.site.com also. This is the default way the asp.net membership thing works. So you would need to keep this in mind.
Rest i think the sub domain philosophy is good enough.
Subdomains might work just fine with asp.net membership. Because the was the tables are created for the membership provider there is a aspnet_applications table which has fields for te application name and description. In the aspnet_memberhip table, each user has a field for applicationID. If the application name is the subdomain then you could possibly limit which user can gain access to which application. XYZ subdomian would be one application with it's own ID, and ABC application would be another one.
Interesting domain problem. Good luck and share your results after it's creation.