Task Registration Documentation

“Task Registration – WordPress plugin” Documentation by “Atypisch (Marten Timan)” v2.4


taskregistration-preview

“Task Registration”

Created: 27/03/2017
By: Marten Timan, Atypisch webdesign & webdevelopment

Email: marten@atypisch.nl

Thank you for purchasing my plugin. If you have any questions or suggestions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!



Features:

  • Create work functions and job descriptions, and assign them to your users
  • Add and manage projects in detail
  • Add estimates for each project and get an overview of the hours spent
  • Assign administrator, project manager and basic roles to your users
  • Assign projects to users
  • Easy to use Task Registration showing only active and assigned projects
  • Weekly calender overview
  • … and much more

Table of Contents

  1. Installation instructions
  2. Using the plugin
  3. Different User Levels
  4. Options
  5. PHP File functions and Structure
  6. JavaScript
  7. About this Plugin

A) Installation instructions top

Just copy this plugin (the entire ’task-registration’ folder) into your WordPress plugins directory. Then go
to your plugin section in the WordPress CMS and click ‘Activate’.


B) Using the plugin top

Once installed, in WordPress you will see a new tabs called ‘Task Registration’.
As an administrator you have the ability to add/manage projects, functions, tasks, users and more. You can define the content show per User Level, more of which is explained below.
The Tabs in order are Status, Task overview, Add tasks, Active projects, Manage projects and Functions.

taskregistration-preview-item1 taskregistration-preview-item2 taskregistration-preview-item3 taskregistration-preview-item4

Status

Visible by Administrator and Project Managers only. This shows a quick status overview of your users. The first table shows an overview of the last completely filled in Working Day per user.
In ‘Tasks by date and user’ you can select a date and User, and check (and edit/delete) all tasks of all users.

 

Task Overview

Visible by all users. This shows a calendar-like overview per week with all your tasks per day. You can show/hide these tasks and edit or delete them.
If your amount of registered tasks is equal to or exceeds the amount of working hours per day it will show in green. If the amount is less it will show up in red. ” no tasks added yet ” will show is you have not yet added tasks for that date.

Add Tasks

Visible by all users. Basically this is the main functionality of this plugin. Task registration fields are visible per project. You can only see these fields if you are assigned to a project by a project manager.

Per field it shows the client, project nr or subject and description in the header. Below you can select only the Functions that are assigned to you as a user. In Task description you can write a small description about your activities.

The date is automatically set to the current day, or the day you selected in the Task overview Add or Edit button, or the last day that is not registered completely.

In your Work status you can select Working (default), Free from work, Sick or Travelling as four main options. In the bottom you will have to fill in the amount of hours spent.
You can add your hours up to 2 decimals. Use points, not kommas (so 2.25 or 5.85 is fine for instance).

Active Projects

Visible by Advanced Users and above. Active Projects gives a quick overview of all current Active projects and the hours spent per function on that project. There is also an option to print the current project overview.

 

Manage Projects

Visible by Project Managers and above. Here you can add a new project, fill in a Client name, project number or subject, description, enddate of the project and an estimate of the
total amount of hours for this project per Work Function. This estimate will be the base of the project, and the amont of hours spent will be calculated with this estimate.

Furthermore, you can (and will have to) decide whether the project is active, and which people are assigned to this project. People can only register their tasks if they are assigned to a project.

In the overview below you can edit or delete the active and inactive projects (which are separated by row and color), and you can have a quick overview per project (slightly different then the former project overview).

Adding a Function

Working Functions are necessary to make an estimate for your projects and to assign to your users. For instance, a Graphic Designer, an Account Manager, a Webdeveloper or a Creative Director are all Working Functions.

Add a Working Function title, short description and order here. This order will be used in your estimate and overviews as well. Furthermore you can check the function as Active/Inactive (check for active) and assign the function to one or multiple users by checkbox.

 


C) Different User Levelstop

This plugin uses the WordPress User system as a base for adding tasks based on different User Levels. Every employee, co-worker or collegue involved must have a WordPress Username and Password and has to log in to the CMS to use this plugin.

There are different Roles you can choose within WordPress, read more about the different User Roles here and
about adding users here.

In Task Registration > Options you can change the User Levels for the 3 types of accounts within the plugin. These Users will then only see certain Tabs based on their Account (Basic, Advanced or Project Manager).
So make sure before you add Projects or Functions that you have added WordPress Users first.


D) Optionstop

There are several options for this plugin:

  • Minimum User Level for Basic Account. – The Basic Account level is the most common level and will be used for all users just adding and editing their own tasks. Visible: Task Overview, Add Tasks.
  • Minimum User Level for Advanced Account: – The Advanced Account level also adds the opportunity to view all current projects and details of the registered tasks for those projects. Visible: Task Overview, Add Tasks, Active Projects.
  • Minimum User Level for Project Management: – The Project Management level shows all options and editing capabilities. Visible: Task Overview, Add Tasks, Active Projects, Manage Projects, Functions and Status.
  • How many hours are there in your normal working day? (default is 8) – This number will be used to calculate the minimum amount of hours that all users must register for each working day.

Uninstall

  • On ‘Uninstall Plugin‘ you can uninstall the entire plugin, which will also result in deleting the entire database table for this plugin and all of its settings.
    So please be careful to backup all your data from your database before you uninstall this plugin if you want to keep this.

 


G) PHP File functions and Structuretop

Functions

The plugin consists of several PHP files. The main file functions.php contains all the necessary PHP functions and includes for this plugin. These are the functions briefly explained;

name: qInsertFunction
purpose: Insert new Work-function in the database

name: qGetAllFunctions
purpose: get all Work-functions from the database

name: qGetAllActiveFunctions
purpose: get all active Work-functions from the database

name: qGetAllFunctionNicenames
purpose: get all function nicenames from the database

name: qRemoveFunction
purpose: remove function from the database

name: qGetFunctionByID
purpose: get function by ID from the database

name: qUpdateFunctionByID
purpose: update function by ID from the database

name: qInsertTasks
purpose: insert new Task in the database

name: qGetAllActiveTasks
purpose: get all active Tasks from the database

name: qRemoveTasks
purpose: remove Task from the database

name: qDeleteTasksByProjectID
purpose: remove Task from the database by Project ID

name: qGetTasksByID
purpose: get Task from the database by ID

name: qUpdateTasksByID
purpose: update Task from the database by ID

name: qGetAllDatesFromTasks
purpose: get all the dates from the Tasks in the database

name: qGetActiveTasksByYear
purpose: get all the active Tasks in the database by year

name: qGetActiveTasksByProject
purpose: get all the active Tasks in the database by project

name: qGetCompletedTasksByProject
purpose: get all the completed Tasks in the database by project

name: qGetTasksByUser
purpose: get all the Tasks in the database by User ID

name: qGetTasksByUserByDate
purpose: get all the Tasks in the database by User ID and Date

name: qGetTasksByUserByYear
purpose: get all the Tasks in the database by User ID and Year

name: qGetTasksFromFunction
purpose: get all the Tasks in the database by Function ID

name: qGetTasksFromProjects
purpose: get all the Tasks in the database by Project ID

name: qGetSpentHoursByProjectAndFunctionID
purpose: get all the Hours spent on Tasks in the database by Project AND Function ID

name: qCountTaskHoursByUser
purpose: get all the Hours spent on Tasks in the database by User ID compare with Amount of daily working hours in Settings

name: qInsertProjects
purpose: insert a new project

name: qGetAllProjects
purpose: get all project by project name

name: qGetAllActiveProjects
purpose: get all active projects by project name

name: qRemoveProjects
purpose: remove project by project ID

name: qGetProjectsByID
purpose: get project by project ID

name: qGetActiveProjectByID
purpose: get active projects by project ID

name: qUpdateProjectsByID
purpose: update project by project ID

name: qInsertProjectUsers
purpose: insert project users by project ID

name: qGetProjectUsers
purpose: get project users by project ID

name: qDeleteProjectUsers
purpose: delete project users by project ID

name: qGetAllActiveUserProjects
purpose: get all active project users by project user ID

name: qInsertFunctionUsers
purpose: insert Function Users in the database

name: qGetFunctionUsers
purpose: get Function Users from the database

name: qDeleteFunctionUsers
purpose: delete Function Users from the database

name: qGetAllActiveUserFunctions
purpose: get all active Function Users from the database

name: qGetHoursByID
purpose: get Hours by ID from the database

name: qCheckHoursByID
purpose: check if hour_id exists, if not create, if so update

name: qInsertHours
purpose: insert new hours in the database

name: qGetHoursByProjectID
purpose: get hours from the database by Project ID

name: qGetHoursByProjectAndFunctionID
purpose: get hours from the database by Project ID AND Function ID

name: qUpdateHoursByID
purpose: update hours from the database by Hour ID

name: qRemoveHoursByID
purpose: remove hours from the database by Hour ID

name: qRemoveHoursByProjectID
purpose: remove hours from the database by Project ID

name: qRemoveHoursByFunctionID
purpose: remove hours from the database by Function ID

name: qGetAllDates
purpose: get all the dates from the database

name: tr_options_page();
purpose: Admin options page

name: tr_check_config();
purpose: Create or update the options

name: tr_options_submit();
purpose: Save options

name: check_mysql_table_exists();
purpose: Check if the table exists in the database

name: CreateTables
purpose: Create the necessary mySQL Tables

name: tr_plugin_uninstall();
purpose: Delete the entire database table and remove the options on uninstall.

name: listAllUsers
purpose: List all WordPress users

name: is_weekend
purpose: check if the date is a weekend or not

name: yearArray
purpose: make an array of the year

name: check_yearly_working_dates
purpose: check all yearly working dates

name: write_workday_to_db
purpose: write the working day into the database

name: qGetWorkDays
purpose: get the work days from the database

name: x_week_range2
purpose: return the range of the days

name: previous_week
purpose: get the previous week

name: next_week
purpose: get the next week

name: GetDays
purpose: get all the days from the database

name: convert_date
purpose: convert the date to another format

name: week_of_month
purpose: find out and return week number

Structure

This is the basic structure of the plugin and the containing files, starting from the plugin folder ‘shows-archive’.

  • tr-index.php (main plugin file)
  • create_functions.php
  • edit_functions.php
  • create_tasks.php
  • edit_tasks.php
  • create_projects.php
  • edit_projects.php
  • footer.php
  • functions.php
  • project_overview.php
  • status_overview.php
  • task_overview.php
  • view_people.php
  • view_project.php
  • images (folder)
    • show.png
    • show-over.png
    • showhide.png
    • hide.png
    • hide-over.png
    • calendar.jpg (small calendar icon)
    • ok.png
    • next.gif (next icon for calendar)
    • prev.gif (previous icon for calendar)
  • css (folder)
    • style.css (main css file)
    • form.css (css for forms)
    • print.css (css for print)
    • tabs.css
  • js (folder)
    • calendarDateInput.js
    • functions.js
  • documentation (folder)
    • assets (folder)
      • blueprint css files and images for this explanation file
    • code-example.php (a small PHP code example)
    • index.html (this file)
    • screenshots (folder)
      • (screenshots 1 to 12)

Please do not edit or extend these functions.


H) JavaScripttop

This theme imports and uses several Javascript files. These are stored in the ‘js’ folder.

  1. The WordPress jQuery library is being enqueued.
  2. calendarDateInput.js is used for adding a DatePicker to the forms when adding or editing a show.
  3. functions.js contains a few custom function for the Tabs, show/hide options and for printing a page in a new window.
  • jQuery is a Javascript library that greatly reduces the amount of code that you must write.

I) About this Plugintop

type: WordPress Plugin

languages: PHP, HTML, CSS, MySQL and jQuery javascript

version nr: 2.4

release date: 27/03/2017

This plugin is compatible with all newer versions of WordPress, tested up to WordPress version 4.7.3

Plugin documentation URL: http://www.atypisch.nl/plugins/task-registration/

This plugin is entirely written by Marten Timan, owner and founder of Atypisch Webdesign & Webdevelopment currently based in Utrecht, The Netherlands.

Please feel free to make a donation to stimulate further development of this or other plugins.





Once again, thank you so much for purchasing this plugin. As I said at the beginning, I’d be glad to help you if you have any questions relating to this theme.
No guarantees, but I’ll do my best to assist.
If you have a more general question relating to the plugins on CodeCanyon, you might consider visiting the forums and asking your question in the “Item Discussion” section.

Marten Timan
Atypisch webdesign & webdevelopment

Go To Table of Contents

 
 
 

What does the Shows Archive plugin do?

Simply put, the Shows Archive plugin lets you add a list of shows (from your own and/or
other acts as well) to your website and create an archive.
A new Tab ‘Shows’ is added in your WordPress CMS where you can directly start to add shows.
You can then add lists of shows to your website by Widgets or Shortcode, either Upcoming
or Past, in ascending/descending order and with several other options and features.

Old shows are directly archived in the database, so basically all you have to do is fill in the correct
date and all the extra information like cost, entrance, venue, Google maps, etc. A Full list of features is listed below.

Who should use this plugin?

This plugin is specifically created to add shows and all the (optional) information that comes with that. The default audience for this plugin are musicians, bands and Music Labels.
But this plugin is also very much usuable for theatres or any kind of performers, artists or labels that have shows or exhibitions to plan.

Why is is developed?

I am in several bands myself and have been for years. I was asked to develop this feature once for a Music Label that wanted to list the shows of several of their bands.
It struck me that my fellow bandmembers have always had a hard time working on listing our shows since it was too much of a hassle to copy/paste all the extra information back and forth in our websites.
So I decided to join the two ideas into one well-written and documented plugin with all the basic options (like Widgets and Shortcodes) included.

Table of Contents

  1. Installation instructions
  2. Using the plugin
  3. Using Widgets
  4. Template Usage
  5. Using shortcodes
  6. Styling the plugin – CSS options
  7. PHP File functions and Structure
  8. JavaScript
  9. About this Plugin

A) Installation instructions top

Just copy this plugin (the entire ‘shows-archive’ folder) into your WordPress plugins directory. Then go
to your plugin section in the WordPress CMS and click ‘Activate’.


B) Using the plugin top

Once installed, in WordPress you will see a new tabs called ‘Shows’. Here you have to ability to add shows, manage shows (edit/delete) and to change a couple of options.

Adding a Show

Click on Add a Show and fill in the Form fields. First select the date of the show, then add all other fields you think are necessary. Try to always fill in the name of the venue and the vity you play in. You can also upload an image (a poster/flyer for instance) which uses your media library.

No fields are mandatory, and no empty fields will show up on your website if you haven’t filled in a textfield. Click on the image below for a brief explanation of the fields.

showsarchive-screenshot1

 

Managing Shows

Click on Manage shows; you’ll see an overview of all the shows you added to this plugin. Click on the Edit link behind the show you want to edit; it will appear on the same page above the list.

To delete s show click on Delete and in the pop-up click OK.
Changing settings

In Shows -> Options you are able to change the following options:

  • The default amount of items to show (you can always overrule this in shortcodes, functions and widgets)
  • The dateformat. This is used for the backend as well as the frontend format. Read more about formatting dates here.
  • Sortorder. This is either the Date or the ID (database order of items)
  • Language. I have added 2 simple language files in the plugin, being ‘english‘ and ‘dutch‘. The language files are located in the ‘languages’ folder and are called ‘lang_english.php’ and ‘lang_dutch.php’. English is the default language.
    The language files are now mainly used for the front-end of your website. These are the options now available in the language files:

    • readmore – the text for the ‘read more’ link, triggering the jQuery slide script. Default set as ‘
      more info ›’
    • start – the text for the Start time of your show
    • cost – the text for the entrance fee
    • with – the text for the other acts that are performing
    • description
    • where
    • no_events – the text to show if there are no shows planned
    • more_info – the default text to show if you added a ‘more info link’ but did not add any text for the link
    • config_error – the text that appears in case of configuration errors
    • format_error – the text that appears in case of formatting errors
    • error – general error text

     

    You can edit these files as you wish. If you decide to add another language file, call it the same (for example lang_spanish.php) and put it in the same folder. You can then also adjust the language in the Options textfield to that language ( ‘spanish’).

    Please send me an email if you added a textfile, I would love to expand the range of languages in this plugin.

  • Divider. This is used to divide all the content of the Shows on your website. This could be anything, but I’d recommend using dividing chanracters like / , | or .
  • User Level. If you have other bandmembers or performers having access to the same CMS, you can decide from what level on they may be adding and editing Shows.
  • On ‘Shows uninstall’ you can uninstall the entire plugin, which will also result in deleting the entire databse table for this plugin and its settings.
    So please be careful to backup all your shows from your database before you uninstall this plugin.

C) Using Widgetstop

This plugin also support Widgets. In Appearance -> Widgets a new item has been created called Shows. Drag & Drop this Widget to one of your containers and fill in the necessary fields.

You can add a Title for the Widget, the name of the project or band you want to list shows from, and the amount of shows. You can also select whether to list Upcoming or Past shows and
change the display order to Ascending or Descending. You can use as many of these widgets as you wish. Read more about using Widgets here. Have fun!


D) Template Usagetop

To call the plugin from witin your template you need to add the right function to your theme code. In your template use this code anywhere you wish:

<?php if(function_exists('get_shows')) { echo get_shows(); } ?>

The above function without any attributes calls all the upcoming shows you have entered. There is a more extensive explanation below in the PHP Code explanation section.
There are several attributes you can add to the function as well. You can add the amount of shows you want to retrieve, whether there are upcoming shows or past shows, if you want to list shows from one specific band or project only, and in what order they are shown.

The options have to be filled ni accordingly, and in the right order:

  • Amount: any number. The default amount is 5 and changeable through your options
  • Upcoming or Past: this is case sensitive(!), the only options are ‘Upcoming’ or ‘Past’. Default (without any value) is Upcoming.
  • Project: the name of the project or band you have filled. If blank all shows are listed.
  • Order: ‘asc’ or ‘desc’ (also case sensitive!), default is asc.

For instance, below is how you call 8 Past shows in descending order from the awesome band Shuriken (from holland)

<?php if(function_exists('get_shows')) { echo get_shows('8','Past','Shuriken','desc'); } ?>

Here is how you call 3 Upcoming shows

<?php if(function_exists('get_shows')) { echo get_shows('3','Upcoming'); } ?>

To make life a little easier for yourself you can also define the variables as below. This doesn’t have to be within the LOOP.

codeexample

 


E) Using shortcodestop

After the plugin is installed and activated it will also add a functionality for using shortcodes to list your shows for easy usage. You can use shortcode just in your posts or pages.

The shortcode tag is called [shows] . There are several options for this shortcode: amount, futurepast, project and order.

  • amount: the amount of shows you want to appear in the list
  • futurepast: either for Upcoming or Past shows, which are case sensitive! Sorry about that, and also sorry for the weird name.
  • project: the name of the band or project you want to list the shows from. Very handy for labels, venues or other users having to display shows from different projects. Don’t bother with this though if you only use this plugin for your own band, act or project.
  • order: either asc or desc (also case sentitive!) listing your shows in and ascending or descending order.

Here are some examples.

This will simply list all of your upcoming shows:


[shows]

This will show only the first two upcoming shows


[shows amount="2"]

This will show the first 4 upcoming shows from the project (or band) called Shuriken. futurepast=”Upcoming” is actually a default value, so not necessary to add.


[shows amount="4" futurepast="Upcoming" project="Shuriken"]

This will show 10 past shows from the project (or band) called Shuriken in descending order.


[shows amount="10" futurepast="Past" project="Shuriken" order="desc"]


F) Styling the plugin – CSS optionstop

CSS file

The main CSS file for this plugin is located in the ‘css’ folder -> ‘css/shows-archive.css’ with some basic styling. You can edit this file as you wish. These are the CSS classes you can use for styling:

  • ul.shows_list — The main list containing a single show
  • ul.shows_list li — The first list-item before the read more link
  • ul.shows_list ul — The second list (within the first list) for displaying extra information
  • ul.shows_list ul li — The second list-items (within the first list) for all the extra information items
  • .shows_picture — The class of the link of the picture you added.
  • .flyer — The class of the picture you added.
  • .extra_info — The class of the extra information list, default is hidden.
  • .expandable — The class of the more_info link wrapper. No styling applied in default.
  • a.expandable-link — The class of the more_info link. Just styled with cursor: pointer; in default.

G) PHP File functions and Structuretop

Functions

The plugin consists of several PHP files. The main file index.php contains all the necessary PHP functions and includes for this plugin. These are the functions briefly explained;

Name:      showsarchive_frontend_scripts();
Purpose:   Add scripts to backend CMS only on plugin pages

Name:      showsarchive_frontend_scripts();
Purpose:   Add scripts to frontend website

Name:      shows_add_pages();
Purpose:   Add pages to admin menus

Name:      shows_check_config();
Purpose:   Create or update the options

Name:      shows_mysql_install();
Purpose:   Creates database table if it doesnt exist

Name:      shows_mysql_table_exists();
Purpose:   Check if the table exists in the database
Receive:   $wpdb, $table_name
Return:	   boolean

Name:      shows_mysql_warning();
Purpose:   Database error if things go wrong

Name:      get_shows();
Purpose:   main function to get shows; amount, future/past, projectname and order
Receive:   $amount, $futurepast, $projectname, order - all are optional
Return:	   $final_output

Name:	   shows_shortcode();
Purpose:   Add shortcode for WordPress default users
Receive:   shortcode $atts
Return:	   $list_shows

Name:      wpb_widget extends WP_Widget
Purpose:   Class for creating a default Widget
Receive:   -none-
Return:	   $instance

Name:      wpb_load_widget();
Purpose:   Register and load the widget (default code)
Receive:   -none-
Return:	   -none

Name:      shows_insert_input();
Purpose:   Prepare input form on advanced edit post page
Receive:   -None-
Return:	   -None-

Name:      shows_request_delete();
Purpose:   Remove show from database using GET
Receive:   show id
Return:    boolean

Name:      shows_delete_showid();
Purpose:   Remove show from database
Receive:   show id
Return:    boolean

Name:      shows_request_update();
Purpose:   Update show from database
Receive:   none - uses $show_id through GET
Return:    boolean

Name:      check_update_permission();
Purpose:   CHECK update show permission
Receive:   show id
Return:    boolean

Name:      shows_update_showid();
Purpose:   UPDATE show from database
Receive:   show id
Return:    boolean

Name:      updateActive()
Purpose:   UPDATE active field in database
Receive:   active, $show_id
Return:    $update_query

Name:      shows_add_page();
Purpose:   Admin add show page
Receive:   -none-
Return:    -none-

Name:      shows_manage_page();
Purpose:   Admin add management page
Receive:   -none-
Return:    -none-

Name:      shows_update_page();
Purpose:   Admin management page, show updated messages
Receive:   -none-
Return:    -none-

Name:      shows_options_page();
Purpose:   Admin options page
Receive:   -none-
Return:    -none-


Name:      shows_options_submit();
Purpose:   Save options
Receive:   -none-
Return:    -none-

Name:      shows_plugin_uninstall();
Purpose:   Delete the entire database table and remove the options on uninstall.
Receive:   -none-
Return:	  -none-

Structure

This is the basic structure of the plugin and the containing files, starting from the plugin folder ‘shows-archive’.

  • index.php (main plugin file)
  • add_show.php (the form for adding a show)
  • manage_shows.php (the table listing all of your shows)
  • update_show.php (the editing form and the table listing all of your shows)
  • images (folder)
    • no-image.gif (small image to show iin the CMS when no image is uploaded)
    • calendar.jpg (small calendar icon)
    • controls.png (controls for image popup)
    • loading.gif (loading icon for popup image)
    • next.gif (next icon for calendar)
    • prev.gif (previous icon for calendar)
  • languages (folder)
    • lang_english.php (english laguage file)
    • lang_dutch.php (dutch laguage file)
  • css (folder)
    • colorbox.css (css for the jquery colorbox function)
    • shows-archive.css (css for the front-end of you website)
  • js (folder)
    • calendarDateInput.js
    • colorbox-trigger.js
    • jquery.colorbox-min.js
    • media-uploader.js
    • accordion-trigger.js
  • documentation (folder)
    • assets (folder)
      • blueprint css files and images for this explanation file
    • code-example.php (a small PHP code example)
    • index.html (this file)
    • screenshots (folder)
      • (screenshots 1 to 12)

Please do not edit or extend these functions.


H) JavaScripttop

This theme imports and uses several Javascript files.

  1. The WordPress jQuery library is being enqueued.
  2. calendarDateInput.js is used for adding a DatePicker to the forms when adding or editing a show.
  3. accordion-trigger.js simply triggers the standard jQuery slideToggle function.
  4. colorbox-trigger.js simply triggers the colorbox plugin.
  5. jquery.colorbox-min.js is the minified version of the jQuery colorbox plugin
  6. media-uploader.js is called for using the WordPress Media Library when uploading an image.
  • jQuery is a Javascript library that greatly reduces the amount of code that you must write.

I) About this Plugintop

type: WordPress Plugin

languages: PHP, HTML, CSS, MySQL and jQuery javascript

version nr: 1.0.0

release date: 18/09/2014

This plugin is compatible with all newer versions of WordPress, tested up to WordPress version 4.0

Plugin documentation URL: http://www.atypisch.nl/plugins/shows-archive/

This plugin is entirely written by Marten Timan, owner and founder of Atypisch Webdesign & Webdevelopment currently based in Utrecht, The Netherlands.

Please feel free to make a donation to stimulate further development of this or other plugins.





Once again, thank you so much for purchasing this plugin. As I said at the beginning, I’d be glad to help you if you have any questions relating to this theme.
No guarantees, but I’ll do my best to assist.
If you have a more general question relating to the plugins on CodeCanyon, you might consider visiting the forums and asking your question in the “Item Discussion” section.

Marten Timan
Atypisch webdesign & webdevelopment

Go To Table of Contents

 
 
 

With this WordPress Plugin you can set a Featured Image per Post or Page, which is then used as a full background image.
You can also set a default image for your entire website.

Table of Contents

  1. Installation instructions
  2. Template Usage
  3. Changing Featured Images and Default background image
  4. PHP File functions and Structure
  5. JavaScript
  6. PHP Code Explanation
  7. About this Plugin

A) Installation instructions top

Just copy this plugin (the entire ‘featured-background-images’ folder) into your WordPress plugins directory.

Then go to your plugin section in the WordPress CMS and click ‘Activate’.

B) Template Usagetop

There is no need to adjust anything in your template. Just activate and run the plugin.

Note: The scripts does add piece of CSS to your theme located in the plugins directory in ‘css/background.css‘.
Here are DIVs with the ids #fbi_background and #fbi_bg_image defined.
If you have the same DIVs defined in your existing theme these might conflict eachother.

C) Changing Featured Images and Default background imagetop

You can set a Featured Image for any one of your Posts or Pages.
There is more information on setting a Featured Image in the WordPress support section online here.

A new metabox is added called “Featured Image”. If you already activated this feature in your theme you will now see the extra description as well.

screenshot screenshot screenshot screenshot screenshot

This plugin contains a default Background Image called default_background.jpg and is located in the plugin folder under
../wp-content/plugins/featured-background-images/images/..
This default image will be shown as a background on your website if you haven’t selected a Featured Image for a Page or Post yet.
You can Change the default image here (or manually in the plugin folder).
Accidentally removed the Default Image from this plugin? No worries, we’ve added a backup in your plugin here. 🙂

 

screenshot

D) PHP File functions and Structuretop

Functions
The plugin consists of one simple PHP file (fbi-index.php) which contains all the necessary PHP functions and includes for this plugin.
These are the functions briefly explained;

Featured Image functions
fbi_get_featured_image($post_id);
gets the Featured image through the wordpress get_post_thumbnail_id() function

fbi_columns_head($defaults);
Adds a column to the Post and Page overview

fbi_columns_content($column_name, $post_id);
adds a thumbnail to the columns, a default one if there is no featured image

fbi_add_featured_image_text($content);
adds a text below the Featured Image explaining that the Featured Image is now
indefinitely used as a Background Image

Background functions
fbi_run_background_script();
gets the current post id on the page, checks if there is a Featured Image or not
and then sends the URL to the fbi_add_code_to_body(): function

fbi_add_code_to_body($featured_image_url);
echoes a jQuery scripts into the HEAD section of your pages. This jQuery script in turn
places a HTML code below the body tag containing the background image.
This solution is born out of necessity since there is no available “body” hook in WordPress.

fbi_get_default_image_path();
Since you are able to upload JPG, GIF or PNG pictures we need to define which one is
currently set as the default background image.
Plugin functions
fbi_admin_head();
enqueues scripts and styles in the header

fbi_add_options_page();
adds a ‘Background Image’ page under Settings.

fbi_options_page();
Runs the Options page code with a brief explanation about the plugin
and a link to this documentation page, etc.

the add_filter() and add_action() hooks are necessary to run some of the plugin scripts.
Please do not edit or extend these functions.

Structure
This is the basic structure of the plugin and the containing files, starting from the plugin folder ‘featured-background-images’.

  • fbi-index.php (main plugin file)
  • documentation (folder)
    • assets (folder)
      • ...blueprint css files and images for this explanation file
    • index.html (this file)
    • screenshots (folder)
      • ... (screenshots 1 to 6)
  • images (folder)
    • default_background_thumbnail.jpg (file, default thumbnail shown in CMS Columns)
    • default_background.jpg (file, default Background Image)

E) JavaScripttop

This theme imports a single Javascript file and uses a few small jQuery scripts.

  1. A jQuery library
  2. My custom jQuery scripts
  3. Some custom Javascripts
  1. jQuery is a Javascript library that greatly reduces the amount of code that you must write.
  2. I have written a small jQuery script to add to the Options page, which simply toggles a class in a box to open or close it.
    It looks like this;
    jQuery(document).ready( function($) {
    $(“div.postbox h3”).click(function () { $(this).parent(“.postbox”).toggleClass(“closed”); });
    });
    Another custom jQuery scripts adds generated HTML code dynamically to the body of your theme pages through the jQuery prepend() function like so:
    jQuery(document).ready( function($) {$(‘body’).prepend(‘ CUSTOM_HTML_CODE ‘);} );
  3. Other Custom Javascripts are located in ‘js/functions.js’ and calculate the size of the screen and the amount of px to resize the image.

F) PHP Code explanationtop

This plugin uses the WordPress built-in Featured Image function get_post_thumbnail_id() to get the thumbnail (for the columns) like so:

<?php
function fbi_get_featured_image($post_id) {
$post_thumbnail_id = get_post_thumbnail_id($post_id);

if (!empty($post_thumbnail_id)) {
$the_post_thumbnail_img_array =
wp_get_attachment_image_src($post_thumbnail_id, ‘featured_preview’);
$the_post_thumbnail_img = $the_post_thumbnail_img_array[0];
}

return $the_post_thumbnail_img;
}
?>

To get the actual image we use a Post ID check, then check if that Post has a featured image. If not there is a default-image check.
Then the actual image will be passed on the the next function which will output a background script with the right URL.

<?php
function fbi_run_background_script(){
global $plugin_url;

$the_post_id = get_the_ID();

//check if there is a featured image
if (has_post_thumbnail( $the_post_id ) ) {
$featured_image_url_array = wp_get_attachment_image_src(
get_post_thumbnail_id( $the_post_id ), ‘single-post-thumbnail’
);
$featured_image_url = $featured_image_url_array[0];
} else {
//if there is none apply the default background image
$featured_image_url = fbi_get_default_image_path();
}
//now pass the output to the next function
fbi_add_code_to_body($featured_image_url);
}
?>

G) About this Plugintop

type: WordPress Plugin
languages: PHP, HTML, CSS, jQuery and custom javascript
version nr: 1.0
release date: 19/09/2013
This plugin is compatible with all newer versions of WordPress from WordPress version 2.9.0 up to 3.6.1
Plugin documentation URL: http://www.atypisch.nl/plugins/featured-background-images

This plugin is entirely written by Marten Timan, owner and founder of Atypisch Webdesign & Webdevelopment currently based in Utrecht, The Netherlands.

Please feel free to make a donation to stimulate further development of this or other plugins.

 
 
 
email-users-preview


Release date: 21/05/2014

By: Marten Timan, Atypisch webdesign & webdevelopment

Email: marten@atypisch.nl

If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!

Table of Contents

  1. Installation instructions
  2. Short Description
  3. PHP File functions and Structure
  4. JavaScript
  5. About this Plugin

A) Installation instructions top

Just copy this plugin (the entire ‘email-registered-users’ folder) into your WordPress plugins directory. Then go to your plugin section in the WordPress CMS and click ‘Activate’.

B) Short Description top

This plugin collects all email addresses of the registered users of your WordPress website and groups them according to user role.

You can then email all users per user role, per email address or just all at once through your own email program by clicking the appropriate links.

C) PHP File functions and Structuretop

Functions

The plugin consists of one simple PHP file (‘cc-index.php’) which contains all the necessary PHP functions and includes for this plugin. These are the functions briefly explained;

	/* === Plugin functions === */

	eru_add_page();
	adds WordPress options page under the Tools tab

	eru_options_page();
	builds the options page

	eru_admin_head();
	loads the eru-style.css file

	get_email_info();
	this is where the actual work happens. Collects all
        email addresses, puts them in arrays and outputs again
        according to user role.

Structure

This is the basic structure of the plugin and the containing files, starting from the plugin folder ‘category-colors’.

  • eru-index.php (main plugin file)
  • eru-style.css (main css file)
  • documentation (folder)
    • assets (folder)
      • blueprint css files and images for this explanation file
    • index.html (this file)
    • screenshots (folder)
      • (screenshots)

Please do not edit or extend these functions.

 

D) JavaScripttop

  1. jQuery is a Javascript library that greatly reduces the amount of code that you must write.
  2. I have written a small jQuery script to add to the Options page, which simply toggles a class in a

    to open or close it. It looks like this;

    jQuery(document).ready( function($) {
    		$("div.postbox h3").click(function () {
     $(this).parent(".postbox").toggleClass("closed"); });
    	});
    

E) About this Plugintop

type: WordPress Plugin

languages: PHP, HTML, CSS, MySQL and jQuery javascript

version nr: 1.0

release date: 21/05/2014

This plugin is compatible with all newer versions of WordPress, tested up to WordPress version 3.9.1

Plugin documentation URL: http://www.atypisch.nl/plugins/email-registered-users/

This plugin is entirely written by Marten Timan, owner and founder of Atypisch Webdesign & Webdevelopment currently based in Utrecht, The Netherlands.

Please feel free to make a donation to stimulate further development of this or other plugins.




If you have a more general question relating to the plugins on CodeCanyon, you might consider visiting the forums and asking your question in the “Item Discussion” section.

Marten Timan
Atypisch webdesign & webdevelopment

Go To Table of Contents

 

 
 
 
catcolors-preview

About this plugin

type: WordPress Plugin
languages: PHP, HTML, CSS, MySQL and jQuery javascript, and Colorpicker library
version nr:  1.1
release date: 16/09/2013
This plugin is compatible with all newer versions of WordPress, tested up to WordPress version 3.6.1

Buy this plugin at CodeCanyon here: http://codecanyon.net/item/category-colors/5587892

For a FAQ check out: http://codecanyon.net/item/category-colors/5587892/support
Plugin documentation URL: http://www.atypisch.nl/plugins/category-colors/


How to install

Just copy this plugin (the entire ‘category-colors’ folder) into your WordPress plugins directory.
Then go to your plugin section in the WordPress CMS and click ‘Activate’.


How to change a Category Color

In your WordPress CMS, go to Posts -> Categories and click on a Category you have already created. You cannot choose a color directly when creating a category, because we want to keep creating categories sweet and simple 🙂

screenshot-4

In your Edit Category section, in the bottom you will see a new option called ‘Choose your Category Color. Click on the textfield with the colorcode in it, then a jQuery colorpicker will appear.

screenshot-5

Move your mouse in the color-area or change the RGB values. To select a color, click on the ball-shaped colored icons in the lower right corner of the colorpicker. The value will then also change in the textfield.
After that, click on the blue ‘Update’ button on the left.

screenshot-6

After you have clicked the Update button you will be send to the Category overview section. In the top of the page you will see the message ‘Item updated’.

screenshot-7

How to change a Default Color

In your WordPress CMS, go Settings -> Category Colors. Note: you will have to be logged in as an Administrator to be able to view this page. Here you will see a brief overview of the plugin and Template usage. The default Category color will be used when a new category is created. Afterwards, you can change the color per Category ofcourse.

screenshot-1

To change the default color, click on the textfield with the colorcode in it, then a jQuery colorpicker will appear.

screenshot-2

Move your mouse in the color-area or change the RGB values. To select a color, click on the ball-shaped colored icons in the lower right corner of the colorpicker. The value will then also change in the textfield.
After that, click on the blue ‘Change Color’ button on the left.

screenshot-3

After the default color is updated, the new color will appear in the square below ‘Current Default Color’ and in the textfield.


Template Usage

To call the color from witin your template you need to retrieve the Category ID first. There are several ways to get it.
You can get the Category ID by Category Name like so: <?php get_cat_ID( $cat_name ); ?> (more info online here ).
You can also retrieve the Category ID through an Array. In your template use this code within the loop:

<?php
 $category = get_the_category();
 $the_category_id = $category[0]->cat_ID;
 ?>

Note that you now only retrieve the first given Category in the variable $the_category_id. To retrieve multiple Category IDs just add more variables. For instance, $the_category_id2 = $category[1]->cat_ID; $the_category_id3 = $category[2]->cat_ID; etc. More info online here.

Now, call the Category Colors function and use the Category variable to retrieve the Category Color.

<?php
 if(function_exists('cc_get_color')) {
 $category_color = cc_get_color($the_category_id);
 }
 ?>

You can use the variable <?php echo $category_color; ?> anywhere in your template file after the call. Now you can spice up your Posts and Categories with your own custom colors, have fun!

 


For more plugins or updates by Atypisch visited the Atypisch CodeCanyon account or the Atypisch website.