I am learning wordpress plugins and getting to know it fairly well.
now i think i need help doing small operation is fine but length operation how we do that. i guess AJAX or cron job
an example say i am trying to use content spinner api .so i have to send 100 post title and content to content spinner ,wait for response and update post title and content.
whats the best way to do that in wordpress plugin
Ajax where each post is sent to content spinner api and on result we update UI. please point good tutorial for that
or a cron job but i know wordpress cron job is limited
please please advise
If you do not want to keep the user locked until the API returns the result best option would be to use a cronjob that will run a PHP script which will update all your articles. Not necessarily Wordpress cronjob because that could cause delays if the site doesn't have any traffic, you could use a system cronjob.
With AJAX you will still lock the user, if the user closes the page the API call will not be finished and the title and content won't be updated.
Depends mostly on how the plugin is going to be used. If you want to spin the content on bulk articles (100 posts at once) go with cronjob, if you want to spin the content after the user has written the article do it with AJAX or hook your plugin on save_post action.
Related
Is there a way to save posts when WordPress goes down?
Can I use a hook that saves this post into a cookie if no internet connection?
And when I got the connection back it will "run" the offline file and upload it to the WordPress installation.
Hope you understand what I want to achieve
For that you would have to have a client side app handling post creation.
I'm developing a Wordpress plugin to do a migration of data from a custom CMS.
Since the migration itself follows several steps and would take a while before being completed, I would like to have an admin page that would show the progress of backend script while it's importing the data.
I have read some articles online about such a communication between the backend and the client but there's nothing about the situation in which client and backend are inside the Wordpress framework (there are some constrains about setting the client properly).
Thank you,
Luca
In order to display the progress of a PHP process live, you will have to have the PHP script that is running update the state of a post that can be read from JavaScript such Angular over fixed intervals.
I would have the PHP create a post and store the process state using JSON, and have Angular using post and interval update the admin view.
You may have seen WP plugins that allow guests to submit posts. Those submissions proceed to the WP posts area where the admin can edit/publish them.
I want to create a form like this that I can install on my (and other people's) computers, so they can fill out the form fields for a WP post, save offline, then send to my WP site when ready.
Can anyone tell me the steps involved, and, if there is a description for what type of thing this is, please let me know to aid my search.
I am learning code at present and want to learn while building tools.
Thanks
Hi hope I can give you some hints with this answer.
I don't know what programming language you would like to use, but for the communication with your Wordpress blog you could use the WP API to create a post over REST API. It offers a API to create and edit your Wordpress Posts over HTTP.
Your programm just have to check if an connection is possible and then execute the API calls.
You could use an database to store all created post and then call the Create Post Task with the POST Method over HTTP for each post saved offline.
When the creation was successful you could update your offline database, so that the post is marked as already created.
I would like to have Blog post of the RSS feeds of a particular URL, whenever any new topic will be added to the RSS, a new blog post should automatically be created.
I would like to have it in Umbraco.
Does anyone have any workaround.
Since this will require a scheduled service of some kind there is one option if you would like to use Umbraco only which is to use Umbraco Scheduled Tasks
Read more at http://our.umbraco.org/wiki/install-and-setup/scheduled-tasks, there is also the http://our.umbraco.org/projects/developer-tools/taskscheduler that brings a bit more power to scheduled tasks in Umbraco.
Depending on your Umbraco-version (which you didn't state) the page (blog) creation can vary, here is however a pretty nice sample http://en.wikibooks.org/wiki/Umbraco/Samples_and_Articles/Creating_umbraco_pages_programmatically
So the process would be
Create an aspx page will the required logic to work with your RSS-feeds
When a new post in a RSS-feed is detected invoke the code that creates a new page/blog
I have this page:
http://www.thedome.it/cmsms/index.php?page=alla-spina
I'd like to send a newsletter to subscribers every time this page is updated, automatically. I don't have admin privileges for this CMS thus I can't install modules, so I was thinking about a service such as FeedBurner, if only this page had a unique RSS feed (but AFAIK it doesn't, right?).
Do you know of any service/software that will allow me to solve this particular problem?
Thanks.
To do this without access to the server you will need another server with corn jobs enabled.
If I there you I would create a simple scrape script which would also check if the content of the page have not changed. Using print version of the page may make it much easier to process. The last thing to do is to set up a corn job which would run the script at desired intervals.