Skip to content

Commit

Permalink
Updated icon and plugin documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-west committed May 23, 2018
1 parent 66c78db commit d46d266
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 190 deletions.
2 changes: 1 addition & 1 deletion .craftplugin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"pluginName":"Do Not Track","pluginDescription":"Helpers for respecting Do Not Track headers sent by browsers.","pluginVersion":"1.0.0","pluginAuthorName":"Matt West","pluginAuthorUrl":"https://mattwest.io","pluginAuthorGithub":"matt-west","codeComments":"yes","pluginComponents":["services","variables"],"controllerName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","widgetName":"","apiVersion":"api_version_2_5"}
{"pluginName":"Do Not Track","pluginDescription":"Helpers for respecting Do Not Track headers sent by browsers.","pluginVersion":"1.0.0","pluginAuthorName":"Wildbit","pluginAuthorUrl":"https://wildbit.com","pluginAuthorGithub":"wildbit","codeComments":"yes","pluginComponents":["services","variables"],"controllerName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","widgetName":"","apiVersion":"api_version_2_5"}
38 changes: 3 additions & 35 deletions DoNotTrackPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function getDocumentationUrl()
*/
public function getReleaseFeedUrl()
{
return 'https://raw.githubusercontent.com/matt-west/donottrack/master/releases.json';
return 'https://raw.githubusercontent.com/wildbit/craft-donottrack/master/releases.json';
}

/**
Expand Down Expand Up @@ -99,7 +99,7 @@ public function getSchemaVersion()
*/
public function getDeveloper()
{
return 'Matt West';
return 'Wildbit';
}

/**
Expand All @@ -109,7 +109,7 @@ public function getDeveloper()
*/
public function getDeveloperUrl()
{
return 'https://mattwest.io';
return 'https://wildbit.com';
}

/**
Expand All @@ -121,36 +121,4 @@ public function hasCpSection()
{
return false;
}

/**
* Called right before your plugin’s row gets stored in the plugins database table, and tables have been created
* for it based on its records.
*/
public function onBeforeInstall()
{
}

/**
* Called right after your plugin’s row has been stored in the plugins database table, and tables have been
* created for it based on its records.
*/
public function onAfterInstall()
{
}

/**
* Called right before your plugin’s record-based tables have been deleted, and its row in the plugins table
* has been deleted.
*/
public function onBeforeUninstall()
{
}

/**
* Called right after your plugin’s record-based tables have been deleted, and its row in the plugins table
* has been deleted.
*/
public function onAfterUninstall()
{
}
}
31 changes: 10 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,26 @@
# Do Not Track plugin for Craft CMS

Helpers for respecting Do Not Track headers sent by browsers.
Helpers for respecting [Do Not Track headers](https://allaboutdnt.com) sent by browsers.

![Screenshot](resources/screenshots/plugin_logo.png)
Brought to you by [Wildbit](https://wildbit.com)

## Installation

To install Do Not Track, follow these steps:

1. Download & unzip the file and place the `donottrack` directory into your `craft/plugins` directory
2. -OR- do a `git clone https://github.com/wildbit/craft-donottrack.git` directly into your `craft/plugins` folder. You can then update it with `git pull`
3. -OR- install with Composer via `composer require wildbit/craft-donottrack`
4. Install plugin in the Craft Control Panel under Settings > Plugins
5. The plugin folder should be named `craft-donottrack` for Craft to see it. GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads.
3. Install plugin in the Craft Control Panel under Settings > Plugins
4. **The plugin folder should be named `donottrack` for Craft to see it.** GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads.

Do Not Track works on Craft 2.4.x and Craft 2.5.x.

## Do Not Track Overview

-Insert text here-

## Configuring Do Not Track

-Insert text here-

## Using Do Not Track

-Insert text here-
You can use the `doNotTrack.isEnabled` variable to check whether DNT is enabled in the user’s browser from your twig templates.

## Do Not Track Roadmap

Some things to do, and ideas for potential features:

* Release it

Brought to you by [Wildbit](https://wildbit.com)
```twig
{% if craft.doNotTrack.isEnabled %}
Do Not Track is enabled.
{% endif %}
```
62 changes: 10 additions & 52 deletions resources/icon-mask.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 10 additions & 52 deletions resources/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 0 additions & 15 deletions services/DoNotTrackService.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
*
* DoNotTrack Service
*
* --snip--
* All of your plugin’s business logic should go in services, including saving data, retrieving data, etc. They
* provide APIs that your controllers, template variables, and other plugins can interact with.
*
* https://craftcms.com/docs/plugins/services
* --snip--
*
* @author Matt West
* @copyright Copyright (c) 2018 Wildbit, LLC
* @link https://wildbit.com
Expand All @@ -22,16 +15,8 @@

class DoNotTrackService extends BaseApplicationComponent
{
/**
* This function can literally be anything you want, and you can have as many service functions as you want
*
* From any other plugin file, call it like this:
*
* craft()->doNotTrack->isEnabled()
*/
public function isEnabled()
{
return (isset($_SERVER['HTTP_DNT']) && $_SERVER['HTTP_DNT'] == 1);
}

}
14 changes: 0 additions & 14 deletions variables/DoNotTrackVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
*
* Do Not Track Variable
*
* --snip--
* Craft allows plugins to provide their own template variables, accessible from the {{ craft }} global variable
* (e.g. {{ craft.pluginName }}).
*
* https://craftcms.com/docs/plugins/variables
* --snip--
*
* @author Matt West
* @copyright Copyright (c) 2018 Wildbit, LLC
* @link https://wildbit.com
Expand All @@ -22,13 +15,6 @@

class DoNotTrackVariable
{
/**
* Whatever you want to output to a Twig template can go into a Variable method. You can have as many variable
* functions as you want. From any Twig template, call it like this:
*
* {{ craft.doNotTrack.exampleVariable }}
*
*/
public function isEnabled()
{
return craft()->doNotTrack->isEnabled();
Expand Down

0 comments on commit d46d266

Please sign in to comment.