Smart system is a free infusion for content management system PHP-Fusion which allows you to install themes, infusions, panels directly on your own site.
Version 3.0 for PHP-Fusion All, 16 September 2012
Very API Guideline

Smart Very API is a new social button for your sites. With it you allow to rate the each page of your site by members. This is an API system, so you can easily embed the code and start using. Try it now!

You can change the options of Very button to configure it for your needs. All configuration options is described in Guideline below.

Table of contents

Headers embedding
«Very» button embedding
Arguments
Defaults
Localizations
Licensing
Examples
History
Active links

Guideline

Part 1: Headers embedding

Put this code into the <head></head> tag on your site. This lines import the style sheet and the main API script.

CODE:
<link rel='stylesheet' type='text/css' href='http://smart-fusion.ru/api/very/exterior.css' media='all' />
<script type='text/javascript' src='http://smart-fusion.ru/api/very/jquery.very.api.js'></script>

Warning: Very API script is powered by jQuery - a Javascript framework. If jQuery is not initialized on your site you have to add the following code into the top of the <head></head> section.
If you use another library like Prototype put the code above after jQuery initialization and exactly before your library.

CODE:
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js'></script>

Part 2: «Very» button embedding

Put the following code into the page where you would like to see the button.

CODE:
<div id='very_button'></div>
<script type='text/javascript'>
Very.Run("very_button", "API_KEY", {type: "very"});
</script>

Arguments:
very_button - element ID where the button is created;
API_KEY - the personal API Key - Get a new one.

Parameters:
When the application is displayed it passes the following parameters:

type [string] - the type of application - default is "very";
mode [string] - application's orientation - contains "vertical" for vertical display or "horizontal" for horizontal display;
siteUrl [string:url] - location address of the current page (URL) - if you want to rate the entire site by one button you have to change the value to static, for example, "http://smart-system.ru/";
sync [boolean] - allows to synchronize values of all buttons on the page;
secureIp [boolean] - allows to vote with [true]/without [false] checking of the IP address for existence - if the value is false you can vote infinitely;
prune [boolean] - allows to convert long numbers to abbreviated format of the value, for example, 1105 will be displayed as 1,1ths.;
cache [boolean] - allows to cache the content (over the 14% of speed increasing) - recommended value is true;
debug [boolean] - if you have problems with your language displaying you can set true to switch into English;
theme [string] - set the name of the custom theme (see available themes).

Defaults:
Default values of the application's parameters which are described above:

type: "very"
mode: "horizontal"
siteUrl: location.href (URL of the current page; usage)
sync: false (disabled)
secureIp: true (enabled)
prune: false (disabled)
cache: true (enabled)
debug: false (disabled)
theme: "default" (more themes)

Custom embedding:
Example of Very API custom script embedding with fully-contained arguments:

CODE:
<script type='text/javascript'>
Very.Run("very_button", "API_KEY", {type: "very", mode: "horizontal", siteUrl: location.href, sync: false, secureIp: true, prune: false, cache: true, debug: false, theme: "mono"});
</script>

Part 3: Localizations

The application is supported more than 20 languages, such as:

Belarussian
Bulgarian
Czech
Danish
Dutch
English
Estonian
Finnish
French
German
Icelandic
Indonesian
Irish
Italian
Norwegian
Polish
Portuguese
Romanian
Russian
Slovak
Slovenian
Spanish
Swedish
Turkish
Ukrainian

All languages are choosed automatically by members country affiliation.

Part 4: Licensing

This work is licensed under the Creative Commons Attribution-NoDerivs 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

Part 5: Examples

Theme Horizontal Mode Vertical Mode
Default
Following themes are available since API version 2.0
Light
Mono

Part 6: History

2011-2013
version 1.0.1.53

The first «Very» was developed in 2011 to rate page contents by people. It was fueled by API 1.0 and had a big part of current API parameters.

since 2014
version 2.0.0.71

The latest version. It works on API 2.0 and provides the new button UI including flat design.

Part 1: Headers embedding
Part 2: «Very» button embedding
- Arguments
- Defaults
Part 3: Localizations
Part 4: Licensing
Part 5: Examples
Part 6: History
Part 7: Active links

Comments
No Comments have been Posted.
Post Comment
Please Login to Post a Comment.
Users Online
» Guests Online: 2

» Members Online: 0

» Total Members: 334
» Newest Member: phocohanoi2
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
EnglishRussianGermanSwedishDanishFrenchItalianPolishSpanish
Partners from around the world

RusFusion

PHP-Fusion

PHP-Fusion U.S.A

PHP-Fusion Sverige