Coding

SMG Data Display Plugin for WordPress

Description

A data display plugin for Shema Media Group’s podcasts information and for radio program guides that are provided on sites maintained by Shema Media Group.

Commissioned by JS Produksiyon.

Installation

    1.  Upload smg-dpp.zip to your site and unzip to the /wp-content/plugins/ directory
    2. Activate the plugin through the Plugins menu in WordPress

Configuration

After installing and enabling the plugin open Settings > SMG Data Display and fill in the SMG JSON file location box with the full path to the JSON document containing the properly formatted information or else, if plugin is running on the server containing the JSON documents, click the SMG Server item and select the proper file from the dropdown.

For example:
/var/www/somesite.com/radio-1.json
https://www.shemamedia.com/xfer/radio-1.json

Upgrading the Plugin

Because this is a plugin that does not reside in the WordPress repository, you will have to disable the plugin and remove it and then upload the new version.
As of v.0.4 you can back up your settings data before uninstalling by checking the Settings Backup checkbox on the SMG Data Display Plugin Settings page.

Display via Shortcodes

[smg-akis]
Lists the program guide. Takes two options:

  • sekme — If set to sekme="evet" (default), displays each day of the program guide in a series of tabs. If set to sekme="hayir", displays the program guide as a list of days.
  • linkler — If set to linkler="evet", links each program to the respective podcast page. If set to linkler="hayir" (default) writes titles without links.

Table width can be customized by using the Custom CSS option of the WordPress theme and operating on the following classes:

  • .ddp-guide-table – whole table
  • .ddp-guide-table-row – Rows of the table
  • .ddp-guide-table-head – table header cells
  • .ddp-guide-table-cell – table body cells

 

[smg-program-liste]
Writes out a list of all programs broadcast on the given station.

  • sunum — If set to sunum="album-art" (default) displays a columnar view with album art for each item. sunum="liste" displays an unordered list. sunum="sutun" displays a responsive columnar layout. sunum = "paragraf" displays each item in a paragraph. sunum="baslik" displays each item in a heading (h3) style.
  • linkler — If set to linkler="baslik" (default), links each program to the respective podcast page. If set to linkler="hayir" writes titles without links. If sunum="sutun" is set, linkler="daha" adds “Listen to Podcast” link below the item.
  • kategoriler — If set to kategoriler="evet" (default), displays links to allow sorting of programs by categories. If set to linker="hayir" does not write out the links for the categories.

Customizing list layouts using Custom CSS option of WordPress theme:

  • Categories are a formatted unordered list that can be altered through the .ddp-categories class.
  • Columnar layout can be customized via .ddp-list-col class (note: do not alter the float attribute!).
  • List layout can be customized via ul.ddp-list-list and li.ddp-list-item classes
  • Paragraph layout can be customized via div.ddp-list-paragraphs and p.ddp-list-item classes.
  • Heading layout can be customized via div.ddp-list-headings and h3.ddp-list-item classes.
  • “Listen to Podcast” link can be customized via p.ddp-list-more class.
  • Album art view can be customized through the .ddp-list-withart-custom class.
  • Details pane can be customized using the following ID’s:
    • #ddp_prog_detail for pane
    • #ddp_prog_detail_art for album art column
    • #ddp_prog_detail_data for data column
    • #ddp_prog_detail_footer for footer
    • #ddp_prog_detail_pcbutton for listen to podcast link

You can access other classes and ID’s by looking at the page source.

 

[smg-calan-parca]
Provides a code snippet that allows for the current item played on the internet stream to be displayed and dynamically updated. Takes one option:

  • son_on — If set to son_on="evet" (default) provides a link to a popout to display the last 10 pieces shown. If set to son_on="hayir" link with last 10 is not displayed.