GithubHelp home page GithubHelp logo

course-shortcode's Introduction

=== Plugin Template ===
Plugin Name: UBC Courses
Plugin URI: https://github.com/ubc/course-shortcode
Description: Allows the listing of UBC courses and sections with data from the UBC calendar.
Version: 1.0.2
Author: Michael Ha (CTLT) and Shaffiq Rahemtulla (ArtsISIT)
Author URI: http://isit.arts.ubc.ca
License: GPL3

A simple WordPress plugin that allows the listing of UBC courses, sections and instructors with data from the UBC calendar.

== Description ==

A simple OOP WordPress plugin that allows the listing of UBC courses, sections and instructors with data from the UBC calendar. This plugin comes with an options page "UBC Courses" with form submission, a route handler (for custom submission, AJAX and page rendering), activation and deactivation actions, automatic admin panel JavaScript and CSS loading, string sanitization function, further validation constraints on allowable option size and two main shortcodes, "ubccourses" and "ubcinstructors". 

The continuing operation of this plugin is dependent on the good graces of the folks at UBCIT who provide the necessary business functions to serve up the data.

== Features ==

Uses the WordPress Transients API throughout the coding as a way of storing cached Calendar data in the database temporarily and reduces the amount of traffic to and from the UBC Calendar server. 

== [ubccourses] shortcode ==

In its basic form the [ubccourses] shortcode allows the listing of UBC courses with data obtained from the UBC Calendar. Some of the allowed parameters are as below:

 - department (default ” – if left empty will show example of usage)
 - course (default ” – if department filled and course empty then you get all depatmental courses listed)
 - tabs (default false – if true, the data is setup with tabs for each level of courses e.g. 100 year level, 200 year level etc)
 - pills (default false – if true, the data is setup with pills for each level of courses e.g. 100 year level, 200 year level etc)
 - tabcount (default 4 – if true, the data is truncated  at the level level of courses e.g. 400 year level)
 - parentslug (default ” – if entered, any page title (of the form e.g. “ANTH201A” that matches has has a parent equal to the slug will be linked to from the list with a “Details” button
 - opentab (**New parameter not in production – default 1 – has to be between 1 and tabcount – if entered will auto open at that tab/pill
 - profileslug (**New parameter not in production – default ” – if entered and a profile exists on the website, shows a link next to instructors name in the sections listing.
 - sticky winter (**New parameter not in production – default ‘false’ – if true session remains as Winter even if Summer term has begun.
 - instructors (default false - if true and plugin configured (via the settings panel), will list instructors on the main listing page (without users having to click on the "sections" button to see them).
 - fuzzy (default on and set to 80% - does fuzzy matching of instructor names (80% usually "fixes" special char issues in a name))

== [ubcinstructors] shortcode ==

In its basic form the [ubccourses instructorname={name}] shortcode allows the listing of UBC courses that the instructor teaches in the current session. The instructor name has to match exactly with the name in the UBC Calendar. 

If used without the instructorname parameter and on a profile singular page, will show courses taught by that instrucor.

Some of the allowed parameters are as below:

 - instructorname (default '' - if entered and plugin configured (via the settings panel), will list all courses that an instructor teaches within the current session)
 - parentslug (default ” – if entered, any page title (of the form e.g. “ANTH201A” that matches has has a parent equal to the slug will be linked to from the list with a “Details” button
 - profileslug (**New parameter not in production – default ” – if entered and a profile exists on the website, shows a link next to instructors name in the sections listing.
 - sticky winter (**New parameter not in production – default ‘false’ – if true session remains as Winter even if Summer term has begun.
 - instructors (default false - if true and plugin configured (via the settings panel), will list instructors on the main listing page (without users having to click on the "sections" button to see them.


== Installation ==

The plugin is simple to install:

1. Download `ubccourses.zip`
1. Unzip
1. Upload `plugin-template` directory to your `/wp-content/plugins` directory
1. Go to the plugin management page and enable the plugin

== Changelog ==

= 1.0 =
* Initial release
 - Added admin page under Settings to collect instructor data.
 - Added shortcode [ubcinstructors] to display courses by instructor name.

course-shortcode's People

Contributors

amirent avatar enejb avatar loongchan avatar michaelha avatar richardtape avatar scmc avatar shaffiq avatar ubccart avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

course-shortcode's Issues

Styling calendar span with a class or ID

The span that calls in the calendar icon and a title (e.g. Summer 2016) in grey is currently styled inline as shown below:
screenshot_20160707_161318

Could it be assigned a separate class or ID so that one can override it with css if need be? The span element can sometimes display redundantly or interrupt a flow if multiple departments are called, as shown below:

screenshot_20160707_161503

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.