250 likes | 372 Views
Web Site Integration using WordPress MySql. A presentation (that should have been made) to WordPress Meetup By Peter Mantos ; Mantos I.T.Consulting , Inc . http ://mantos.com 13-Feb-2014. Presentation Objectives.
E N D
Web Site Integrationusing WordPress MySql A presentation (that should have been made) to WordPress Meetup By Peter Mantos; MantosI.T.Consulting, Inc. http://mantos.com 13-Feb-2014
Presentation Objectives • Show Web Site Integration as a valuable and viable Business Strategy for small business • Show Web Site Integration is relatively easy for sites developed using WordPress Web Site Integration - Mantos.com
Intended Audience • Original presentation MISSED target audience • This is for WordPress Web Site Developers • Assumes familiarity with WordPress • Does NOT assume any programming (PHP) • Shows where to find some resources • Includes some screen shots Web Site Integration - Mantos.com
Integration • Data exchange between information systems • Relieves people of duplicate entry • Keeps data in synch • Same email address in two different systems • Confident that you have THE correct address • Makes data available that otherwise isn’t • Employees can access blog/post re. new insurance • HR doesn’t know if “Fred” has read that post • Fred doesn’t know if he is eligible for insurance Web Site Integration - Mantos.com
Web Site Integration Web Site Integration - Mantos.com
WordPress has a Database? • WP has its own database • Open Source MySql • Holds pages / posts • Hold usernames & logins • Can be accessed outside of WordPress • Can be augmented to hold “other” data Web Site Integration - Mantos.com
Example: Read and Understood • The Problem: • How to know that “Fred” has read the post on the new insurance plan? • The Solution: • Use the “Read and Understood” WordPress plugin • Function(s) • Gives Fred a button to acknowledge the post • Gives HR a list of acknowledgements Web Site Integration - Mantos.com
How to Install / Configure“Read and Understood”(RnU) • WordPress Admin Dashboard => Plugins • Click “Add New” (Plugin) • Search for “Read and Understood” • Press “Install Now”, then “Activate” • Option: add category & posts to acknowledge • Click “Settings”; select “Read and Understood” • Select category to acknowledge, Save changes Web Site Integration - Mantos.com
RnU Plugin Settings (admin) Web Site Integration - Mantos.com
How Reader Acknowledges • Login to WordPress (optionally, not required) • Read a postunacknowledged Post in category • Press “Read and Understood” Button (after post) Web Site Integration - Mantos.com
How to Get a List of Acknowledgements • Login as WP Admin • Go to RnU Settings • Enter Date Range • Press Export • Save CSV file or • Open with a program such as Microsoft Excel Web Site Integration - Mantos.com
Exported Acknowledgements Web Site Integration - Mantos.com
How does RnU work? • When Installing RnU, a table is created in the existing WordPress MySql database • When Acknowledged, a record is saved with user info, posting info, and date-time • “Export” looks into the table to find records Web Site Integration - Mantos.com
Can Store Data from Anywherein the WordPress MySql Database • Example gets who, what, when from user. • Could get data from anywhere to populate • From company’s HR system (or spreadsheets) • From government web site • Just as easy to write data into table as export • Plugin is just a one-page program in PHP • Most plugins exploit WP Database • Could write custom program to read/write Web Site Integration - Mantos.com
Accessing MySql Data w/o Plugin • Assuming the host permits MySql access • You need the Hostname to the MySqldatabase • And the authorized username and password • You can access data using : • MySqlWorkBench(download it MySql.org) • PhpAdmin (usually on your Host’s control panel) • Custom Programs (written in PHP, C++, etc.) • Linked Tables (such as using MS Access or eXcel) Web Site Integration - Mantos.com
Low Hanging Fruit • Capabilities needed for Web Site integration are: • Have a MySql database • Can already run programs (plugins / custom PHP) • User Login mechanism to secure access to data • WordPress Web Sites alreadyhave those • Potential Custom Development effort: • 1 added table to existing database • 1 program to display 1 additional interactive page • Low cost; possible huge value to clients Web Site Integration - Mantos.com
Conclusion • You have already paid for the capabilities to push/pull data to/from your website • Web Sites enabled with company data are • Secured via logins • More valuable to customers • More attractive to potential customers • Web Site Integration can be simple • Do it ahead of your competitors Web Site Integration - Mantos.com
Questions? • Feel free to contact: Peter Mantos (505) 291-1047 Mantos I.T. Consulting, Inc. peter@mantos.com • See more on the web at: • http://mantos.com/services/web-site-integration/ Web Site Integration - Mantos.com
Extra: Accessing Data using MySql Workbench Web Site Integration - Mantos.com
Extra: PhpAdmin Web Site Integration - Mantos.com
Extra:MS Access Database linked to MySqltable on Website • Download and install MySql Connector/ODBC 5.1.13 (32 bit) from dev.mysql.org • Create new MSACCESS (2010) database • Select External Data ODBC database • Select Link to Data Source using linked tables • Create/Choose Machine Data Source • Can now use MSACESS queries, forms, reporting tools to read, write, & delete Web Site Integration - Mantos.com
Example: MS Access (2 of 4) Web Site Integration - Mantos.com
Example: MS Access (3 of 4) Web Site Integration - Mantos.com
Example: MS Access (4 of 4) Web Site Integration - Mantos.com
Extra: Accessing MySql from WP using PHP • global $wpdb; • is already accessible within WordPress • Can even be used outside of WordPress: • include_once($_SERVER['DOCUMENT_ROOT'].'/…/wp-load.php' ); // … depends on your site • Is an instance of a class: “WordPress Database” • Contains properties such as $wpdb->prefix • Contains methods such as $wpdb->query() • Host, Username, & Password already included! Web Site Integration - Mantos.com