AGuyFawkesMask Posted February 10, 2012 Report Share Posted February 10, 2012 Happy Friday, everyone. I've been pondering ways to decrease the inefficiencies during normal operations at my VA and one of the things I've become determined to engineer is a connection between my WordPress blog and the phpVMS news feature. I'm currently using my blog for all news-related announcements, ranging from press releases to NOTAMs, and I'm using the phpVMS news feature strictly for NOTAMs. In the pilot center, the "News" section appears as a "Dispatch Center" relaying various information from across my entire site, once of them being NOTAMs. These NOTAMs appear as a link, but upon a user selecting a NOTAM, they are directed to the blog where the NOTAM is published. This has all been accomplished via the phpvms_news table via adding a new field to the table (Field: redirect_link). However, I currently have to copy the title of the post and post URL and then fill out the "Add News" form in the Admin Center whenever I publish a NOTAM via my blog. To eliminate this inefficiency, I'm interested in syncing the phpVMS news feature with my WordPress blog such that whenever I publish a blog post containing the category "NOTAM," it will simultaneously post it in the phpvms_news table. This can't be too difficult to do, the only issue is that I've never experimented with WordPress before and would appreciate it if, as I develop the snippet, someone could guide me through the process and advise if I'm getting anything wrong. Thanks in advance--I appreciate the help! Quote Link to comment Share on other sites More sharing options...
AGuyFawkesMask Posted February 17, 2012 Author Report Share Posted February 17, 2012 Sorry to [bUMP] this topic to the top of the forum, but does anyone have any knowledge in this area? I can't expect much, as this isn't a WordPress community by any means, but if anyone knows anything, it'd be much appreciated. Thank you, Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 29, 2012 Administrators Report Share Posted February 29, 2012 What you'll have to do is have a script that goes through the records Wordpress posts table, looks for your keywords (you can use substr_count), and then adds it into the phpvms_news table. You might add a extra column to the phpvms_news table called wordpress_post_id, so you can tell whether you've already cross posted it. Wordpress might have hooks, or a simple admin module, that can run that after you create a new post. Something like: SELECT * FROM wordpress posts loop through posts, find keyword If found keyword, see if post_id is already in the phpvms_news If not, then add it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.