WordPress Multisite - Create New Sites and Users through API? - php

I have created a Wordpress multisite and was wondering if it was possible to programatically add new sites (blogs) and users through the API?
Basically I have another website (ASP.Net C#) where I will be selling something and I want to give users a free blog everytime they buy something. So everytime a user registers on my other website I want to connect to wordpress multisite through the API and create a new blog for the user.
I have looked through some of the documentation on XML-RPC and saw stuff about adding new blog posts but is it possible to add actual blogs too? Or if not, is there any other way of doing this?

Hi: Like a year ago i had the same problem. Im not sure if it is possible to create it using the API. We solved at that time creating the tables automatically with php scripts. An easy way is to have the wordpress core tables, and everytime a new user register, you just copy the wp core tables into new wp tables but with a new prefix. That way you just personalize some fields like blog title.
You can contact me is you think I can help.

Related

Re-implement users in Wordpress with custom post types and fields

I always find really difficult to work with users in Wordpress. So here's the question.
Let's say I want to use Wordpress to build a website with users and I don't want to use standard Wordpress users. I want my users, let's call them siteusers, to have multiple custom fields. I want them to have relationship with custom post types in my site.
For instance let's say I want to build a Spotify clone. I want my users to register, login, but also to create playlists, add songs to playlists, wishlists, etc. I want to have a logic behind this, and i want users to be able to download only songs they have access to.
My idea is to create a custom post type called "siteusers" and add custom fields to them and make a new frontend register/login/lostpassword/my account page/ machanism, different from the standard WP one. I would have to build an authentication method like i would on a rails application without devise.
Could it work, or are there wordpress limitations I am not seeing? Are anyone aware of any similar solution/plugin/tutorial that could save me some work?

How to migrate the posts from an old custom legacy blog to a new WordPress website?

I have to migrate the posts of a very old custom legacy blog made in ASP (the posts are stored in a MySql table) into a new WordPress blog.
So I need your help to find the smartest solution to do it, I rule out the idea of ​​doing it manually because the number of posts that should be migrated is really high.
So looking this ER schema: http://codex.wordpress.org/images/9/97/WP3.8-ERD.png
I thought I could create a script that take a post from the post table of my old legacy blog and create a new record on the wp_posts wordpress post table of the new blog.
Is it a good solution or exist something better? A WP plugin on something like this?
Tnx
It is better to take advantage of the WordPress Codex rather than importing directly into the tables. This will ensure that the IDs/relationships are generated correctly and that data is serialized as needed to the various tables. If you don't want to write custom code, the easiest way to do this would be to use a CSV import plugin - there are several in the WordPress Plugin Repository - but no particular recommendations.

How to automatically tweet when a new article added to Joomla

I have a free wordpress blog which automatically tweets my new article through my twitter account which I have no idea how wordpress does it. I want to do the same thing on Joomla 3.2.3 platform.
What I want to do is when I add a new article into a specific category, I want Joomla to tweet the article's url automatically.
What I have tried is to search for a couple of components doing this. But I am stucked at API/Key-API/Secret validation. The component (AutoTweetNG) needs tweeter API to have read and write level. So I have many web sites to apply this application. In order to have read and write rights twitter asks me to enter mobile phone number in the profile page.
I have decided to make this by hard coding. Is there any oppurtunity to achieve this? It looks it is gonna be a little robot things, and twitter does not let me.
At least it would be great if thic could be done using PHP only.
Try this,
You can achieve it using two things in Joomla, One is create a twitter Oauth APP also create a content plugin for auto tweet.
First you have to create an app with twitter just follow the link.
Then Create a Joomla content plugin with onContentAfterSave event.
Then Once you create an article it will automatically tweets.
Hope its helps..

how to integrate wordpress users with vbulletin users

i have my site in wordpress which has a vbulletin forum now i want that when i create user in wordpress
it will automatically create user in vbulletin.
also when a user login with wordpress account it wil automatically login in vbulletin and able to post
(maintaining session between wp to vbulletin)
i have tried a plugin says "VBsso" bt it work vice vrsa..:( it will integrate vbulletin users to wordpress means i have to create vbulletin user and have to login in vbulletin bt i dont want that...:(
i need wp to vb ..
plzz suggest me some plugin or some code or the way how to do that...??
any idea or suggestion will helps me a lot..thanks in advance
You can give a try to obscureclouddon's mod, as an alternative to vbSSO.
(an other link here)
It seems to be a good choice, since it has features you need :
WordPress->vB features:
*Registration sync – new users created on WP are automatically created on vB
vBulletin ->Wordpress features NEW
*Registration sync – new users created on vB are automatically created on WP
The bad things are :
this modification is in beta stage
free version has limited features, the pro version is, IMHO, expensive... (but it could worth the cost..)

Publish Wordpress Posts to external Database

I am developing a web application in Codeigniter (PHP) and I want to use Wordpress to do the admin side stuff for the application, like add new posts, Import data from files, etc. My application has a separate database of its own. How do I write the data published from the Wordpress Admin Dashboard into my applications Database?
In short, I need wordpress to write into two distinct databases when I hit the "Publish" button for a post.
You could use an WP Multi-User install with a plugin called Multi-post, that will allow you to save one post to multiple sites within the install.
You can do this by creating a cronjob, and check if some new post has been added to the WP database, and copy to your Codeigniter website database or any other needed operations can be done.

Categories