WordPress Plugin Database per User - database

I am trying to develop a store locator script. May exist for WordPress however, after they are installed, no matter who logs into WordPress, each user is adding/deleting entries inside that one database of addresses.
I would like to have it so that each user belongs to a group/company. When they login to WordPress, they can only see their entries in the database.
What would be the best way to implement this?

Implement the stores as custom post types and do not give your regular users the capability edit_others_posts.
WordPress will then not show stores from other users, you don't have to do anything else.

Related

How can i retrive website URL from Joomla DB

i'm managing lot of websites, few of those are Joomla.
Last webmaster has gone without giving any help and i've those Joomla DB that i cannot understand which websites are related to.
I mean, on wordpress, i'd see on "option" table to check URL but where i can find this information on Joomla?
Thanks
Have a look in the configuration.php of each site instead. In them, you can see which database is connected to the specific site.
Joomla by itself does not store the web site URL in this tables or configuration files, and I take that as a merit over Wordpress. The advantage of not storing the URL is that I could simply change web server's configuration when I want to change a site's URL. Everything will appear perfectly, unless for some reason a programmer chose to hard-code the web site URL into his code (which is a very bad practice).
So I suggest look into web server's configuration to get your the document roots and then relate the configuration.php file in there to the databases.
So, no chances.
Only solution i see is to backup and delete DBs one by one, if more than one, and see which website has gone "offline"

Is there a way to interactively create a new Datastore entity kind for Go GAE apps?

Is there a way to create a new Datastore entity kind via some interactive means for Go App Engine apps? The datastore viewer won't let me add new entity kinds, and the interactive console doesn't seem to support Go.
I'm trying to upload some configuration data to datastore, including sensitive data that I don't want to appear in code. So far the best method I can come up with is to write some code to write an empty configuration entity, deploy, run, then use the datastore viewer to set the values.
Thanks in advance.
You absolutely can add new Entity Kinds in the Console.
In the Cloud Console, Click on the Datastore menu item, then 'Create an Entity'. Handy link, just select your project name
Then in the Kind field, just type in your desired Kind name.
First of all your code is safe at AppEngine - nobody can download it. At least nobody outside of Google. You can deploy it to a dedicated version/module and restrict usage to yourself (check current user, ask pass-phrase, etc in your code).
Second you can use Remote API - this way you do not upload any code to AppEngine. You can create entities remotely as you wish using secure HTTPS connection.

Best way to store users to allow single sign-on for multiple asp.net mvc websites

I have multiple asp.net mvc websites hosted in sub folders of a main domain. Each website has its own sql server database. Currently users need to sign up to each individual website if they want access but I am looking for a sso solution. I guess a little bit like how ebay works where you can sign up in one country's domain but can log into ebay from any other of the domains ebay has sites for.
I am looking for the best architectural design to achieve this. After a lot of googling this seems to be the only solution that fits the bill but wanted to check first (http://arunendapally.com/post/implementation-of-single-sign-on-(sso)-in-asp.net-mvc). If this is the right approach how does that effect the database design, would the users now only get stored in their own database all of the other websites have access to?
I think that maybe moving the authentication part of your application somewhere else would be a better option.
You could try the approach suggested in your link.
Another option would be to look at external providers.
I'm thinking here about azure active directory (https://azure.microsoft.com/en-us/documentation/articles/active-directory-whatis/ with this example http://www.asp.net/identity/overview/getting-started/developing-aspnet-apps-with-windows-azure-active-directory) or auth0 (https://auth0.com/) for example.
That way you have a separate place for your user accounts which are in a database on the cloud which you don't have to manage. Somthing like azure active directory allows you to also set which users are allowed to access which app, which is also something you need to take into account.

How does writing to a database work when a web app uses multiple databases like Sitecore has

In Sitecore you basically have three databases. The Core, Master and Web database.
Simply put the Core database holds all Sitecore settings. The Master database is the authoring database. So it contains all versions of any content.
Then in Sitecore you can "publish" the contents and it will publish the latest version of each content to the Web database.
So suppose I have a website with a news page. And a user is able to edit a news item from the web site (so not through the CMS). How would the database then get updated when it's set up like this?
It would probably update the Web database, but then when I go into the CMS I don't see the latest changes, since the CMS reads from the Master database, right?
So does that mean that it should write twice? Once to the Web database and once to the Master database?
Can anyone tell me how this works in Sitecore or the like?
The reason I'd like to know this is becasue I'm thinking of creating a similar database setup. And I'm just not sure how to solve this issue.
When you have items that needs to be updated by the website visitor, you need to use the SitecoreService SOAP webservice or create your own custom webservice that runs on the Master-instance and triggers a publish after updating.
Well, Sitecore has a publishing step. When the user publishes in Sitecore, it updates the Web database at that point. If you want to build a similar system, I would simply store all versions of an item in the Master database and only when the user chooses to publish, copy the latest version to the Web database.
If your site
- generates a lot of comments
- generates the comments continuously
- uses multiple content delivery servers
- requires CMS users to manage them
I would not store the comments as content items.
The reason is HTML cache and publishing behavior.
On high volume site you'd most certainly use html caching to achieve best possible performance. If a publish is required to show comments, you'd need frequent publish actions and thus html caches are cleared often.
You don't wan't that :-)
Modeling after the DMS implementation is the safest (not cheapest and Datatables isn't something I recommend these days), storing stuff in a separate database, possibly using queuing to prevent an overload if things get busy..

Creating a user login site in Wordpress

I would like to create a site in Wordpress where users are able to log in, and by log in, I do not mean log into the wordpress admin panel. Login to a members area only part of the site. How would I go about this?
Is there a plugin for this or do I need to do this manually using custom php (and MySQL) inside wordpress?
I am asking because there has to be an easy way for this without having knowledge of php...
Several members area plugins exist for Word Press, both free and paid versions. You could try out http://wordpress.org/extend/plugins/member-access/ which is a really simple and free solution. You could also try out BuddyPress for a complete social community overlay. Some other alternatives are reviewed here http://www.mytechopinion.com/2009/07/5-ways-add-membership-wordpress.html

Resources