{"id":158,"date":"2020-05-17T20:49:06","date_gmt":"2020-05-17T20:49:06","guid":{"rendered":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/?page_id=158"},"modified":"2022-08-30T08:04:42","modified_gmt":"2022-08-30T12:04:42","slug":"developer-notes","status":"publish","type":"page","link":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/products\/newswire\/developer-notes\/","title":{"rendered":"Developer Notes"},"content":{"rendered":"\n<p>To republish stories from and\/or contribute stories to the Newswire, your WordPress site must meet the following criteria:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The&nbsp;<a href=\"https:\/\/github.ncsu.edu\/ncstate-ucomm\/newswire-plugin\">NC&#160;State Newswire plugin<\/a>&nbsp;should be activated<\/li><li>Your site should be running at least WordPress 4.7<\/li><\/ul>\n\n\n\n<p>To republish stories from the Newswire, the&nbsp;<a href=\"https:\/\/web.ncsu.edu\/documentation\/topics\/newswire-configuration\/\">plugin settings will need to be configured<\/a>&nbsp;within Settings -&gt; Newswire Settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Downloading the Plugin<\/h2>\n\n\n\n<p>A compiled version of the plugin can be&nbsp;<a href=\"https:\/\/web.ncsu.edu\/dev-tools\/plugins\/newswire-plugin.zip\">downloaded<\/a>, or you can clone&nbsp;and compile the code from&nbsp;<a href=\"https:\/\/github.ncsu.edu\/ncstate-ucomm\/newswire-plugin\">GitHub<\/a>. After cloning the repo, run &#8220;composer install&#8221; to compile the code.<\/p>\n\n\n\n<p>The plugin is&nbsp;also available through ITECS&#8217;&nbsp;<a href=\"https:\/\/www.webtools.ncsu.edu\/wp-updates\">Cthulhu plugin\/theme repository system<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Becoming a Contributor<\/h2>\n\n\n\n<p>To become a contributor to the Newswire, you will need to identify a category that you would like the Newswire to pull stories from. By only pulling stories from a specific category, you can self-curate which stories will be of interest to the campus community at large. When you are ready to become a contributor, please email&nbsp;<a href=\"mailto:ucomm@help.ncsu.edu\">ucomm@help.ncsu.edu<\/a>&nbsp;with the slug of the category. The developers within University Communications will work with you and\/or your technical support member(s) to have the Newswire pull in your stories.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Theme Support<\/h2>\n\n\n\n<p>Posts republished through the Newswire should work&nbsp;out of the box with most WordPress themes. The Newswire copies the post title, post content, post excerpt, and featured image. It does not currently tag or categorize implemented stories.<\/p>\n\n\n\n<p>Given that standard WordPress fields are used, most issues that are encountered are likely to be related to styling. Even then, if a theme supports common CSS classes such as &#8220;alignleft,&#8221; &#8220;alignright,&#8221; etc., little additional theme edits are likely to be necessary.<\/p>\n\n\n\n<p>If you do run into issues, please email&nbsp;<a href=\"mailto:ucomm@help.ncsu.edu\">ucomm@help.ncsu.edu<\/a>. University Communications can provide basic troubleshooting with most themes. Commonly encountered issues will be added to this page to help others who are implementing the Newswire on their sites.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How the Plugin Affects Your WP Install<\/h2>\n\n\n\n<p>Posts are imported from the main Newswire server through a REST JSON API. An imported post is added to your site as a standard WordPress post. In addition to post title, post content, post excerpt, and featured image, additional custom fields will be set when a post is imported. These custom fields primarily hold metadata that the Newswire plugin uses to manage a post.<\/p>\n\n\n\n<p>Upon plugin activation a &#8220;Staff&#8221; user is added to your site with the email address of &#8220;newswire@ncsu.edu.&#8221; By default imported posts will be attributed to this author. However, the plugin first checks to see if your site has a user with the same email address of the original author. If it finds a match, that user will be the post&#8217;s author. For generically attributed posts, you can change the user&#8217;s name from &#8220;Staff,&#8221; but you will need to keep &#8220;newswire@ncsu.edu&#8221; as the user&#8217;s email address.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Bugs and Feature Requests<\/strong><\/h2>\n\n\n\n<p>Bugs and feature requests can be submitted to&nbsp;<a href=\"mailto:ucomm@help.ncsu.edu\">ucomm@help.ncsu.edu<\/a>&nbsp;or they can be submitted as an issue on&nbsp;<a href=\"https:\/\/github.ncsu.edu\/ncstate-ucomm\/newswire-plugin\">the plugin&#8217;s GitHub repository<\/a>. Pull requests are welcome and will be considered for merging; however, you may want to discuss complex pull requests within an issue prior to submitting code for merging.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To republish stories from and\/or contribute stories to the Newswire, your WordPress site must meet the following criteria: The&nbsp;NC&#160;State Newswire plugin&nbsp;should be activated Your site should be running at least&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":40,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ncst_dynamicHeaderBlockName":"ncst\/default-header","ncst_dynamicHeaderData":"{}","ncst_content_audit_freq":"","ncst_content_audit_date":"","footnotes":"","_links_to":"","_links_to_target":""},"acf":[],"_links":{"self":[{"href":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/wp-json\/wp\/v2\/pages\/158"}],"collection":[{"href":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/wp-json\/wp\/v2\/comments?post=158"}],"version-history":[{"count":1,"href":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/wp-json\/wp\/v2\/pages\/158\/revisions"}],"predecessor-version":[{"id":159,"href":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/wp-json\/wp\/v2\/pages\/158\/revisions\/159"}],"up":[{"embeddable":true,"href":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/wp-json\/wp\/v2\/pages\/40"}],"wp:attachment":[{"href":"https:\/\/dev.ucomm.ncsu.edu\/documentation\/wp-json\/wp\/v2\/media?parent=158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}