Made to Order Software Corporation Logo

MO Button: Main Page

1.3

Summary

Introduction to the MO Button module
Requirements
Installation
Module security.
Module changes.
Errors generated by this module.
Copyright (c) 2009-2011 Made to Order Software Corp.

Introduction to the MO Button module

The MO Button module was created by Made to Order Software Corporation. It is used to dynamically add real nice buttons to your pages.

Back to Summary

Requirements

MO Button has no special requirements from any other Drupal modules.

MO Button requires graphics drawn in a very specific way so it works. The buttons are cut in 8 pieces and one background. It can also use one or two icons (optional). At this time it supports the following images in alphabetical order:

  • background
  • bottom_left_corner
  • bottom
  • bottom_right_corner
  • left_edge
  • left_icon (optional)
  • right_edge
  • right_icon (optional)
  • right_edge
  • top_left_corner
  • top
  • top_right_corner

Note that the extension is not specified since you are welcome to use any format (i.e. GIF, JPEG, TIFF, PNG, and any other format supported by browsers.)

By default, those images are expected to be found under sites/<domain>/files/mo_button/<button_name>/*.*

<domain> is default on single installations. It is the domain name of your site on a multi-site installation.

<button_name> is any name you'd like to use. It is used and shown by the module and as such cannot include space characters. Our default button is named 'm2osw' which is offered with the module as an example of a button you can use.

We have more documentation on our website that describes the graphical aspect of the buttons in order for you to know how to draw & cut your own buttons. It is simple, but it requires a specific way of thinking that most graphics people are not used to.

http://new.m2osw.com/how_to_create_an_mo_button

Back to Summary

Installation

In order to install this module:

  • Extract the tarball under sites/all/modules
  • On your server, feel free to delete the doc sub-folder (it is safe since it is just and only static HTML)
  • Go to admin/build/modules and select MO Button
  • Go to admin/settings/mo_button and define the location where you will provide images
  • Go to admin/build/mo_button and change each button setup (the graphics need to have already been uploaded to your Drupal server)
  • Go to admin/settings/filters to select the MO Button filter so the tag gets converted, there are not settings but you MUST properly order your filters!

It is VERY important that you put the MO Button filter at the right place in your list of filters. There are several problems as follow:

  • style attribute--The module makes use of the style attribute, thus you want to make sure that your HTML Filter appears BEFORE the MO Button filter
  • URLs--Your buttons are likely to often use a URL, that means something that looks like "http://domain/path"; By default, the URL Filter will transform those into tags, that filter must appear AFTER the MO Button filter

Note that security was put in place to ensure properly, valid data is accepted and code representing possible XSS attacks automatically removed. Therefore you do not need to run the HTML Filter against the output of this filter.

Back to Summary

Module security.

This module is expected to be used by any user. The content of the button is well under control of the module and the title label will be checked for only allowed tags and tag parameters. In fact, the style parameters will always be removed.

The administration screens are protected by a permission flag that you have to select in order for other users to access. Note that the button edit is safe but not the global settings which would allow someone to change the path to the buttons.

Back to Summary

Module changes.

  • Version 1.1

Fixed the location in the area around the anchor.

Fixed the vertical positioning of the left and right icons.

Changed the <span> around the table in a <div> and changed the CSS so it works as expected (i.e. the <div> acts just like a <span>.)

  • Version 1.0

First working version.

Back to Summary

Errors generated by this module.

This module may generate errors whenever the tag syntax cannot be interpreted properly. At this time, it simply returns the standard link instead of the button.

A very specific set of images is required for any button to work. If one or more is missing, the module generates an error with the name of each of the missing image.

Back to Summary

Copyright (c) 2009-2011 Made to Order Software Corp.

http://www.m2osw.com/mo_button contact@m2osw.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Back to Summary
Documentation generated by Doxygen on Sat Mar 12 16:05:23 2011