=== WoWpi === Contributors: avenirer Donate link: http://avenir.ro Tags: World of Warcraft, wow, armory Requires at least: 3.0.1 Tested up to: 4.5.3 Stable tag: 2.0.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html The WoWpi plugin allows you to retrieve data from Battle.net API regarding your World of Warcraft character. == Description == The plugin allows you to get your character data from Battle.net API service. The plugin uses caching of 12 hours, so you don't have to worry about reaching the quota established by the Battle.net. Also, for general data, like classes, factions, races and so on, the cache is set for 14 days. If you however find yourself in the position to show data that appeared between the refresh of caches you can go to the admin section and save your data again, which will simply destroy all cache. For example, a new expansion appeared in World of Warcraft with and you created a new character of a race that didn't exist before the expansion. In order to show that race you need to refresh the cache. Just go to WoWpi settings and push the save button. That's it. The plugin allows you to choose if you want to include the Tooltip script from Wowhead (the one that shows a tooltip on mouseover). More info on the Tooltip can be found here (http://www.wowhead.com/tooltips). Also, when retrieving the Guild Tabard, the plugin uses the great tabard creator that can be found here: http://tabard.gnomeregan.info/ == Installation == The WoWpi plugin allows you to get your character data from Battle.net API service. 1. Upload the plugin files to the `/wp-content/plugins/wowpi/` directory, or install the plugin through the WordPress plugins screen directly. 2. Activate the plugin through the `Plugins` screen in WordPress. 3. Create an account on Battle.net API (https://dev.battle.net/member/register). 4. After creating an account on the Battle.net API website, you must add your website on the Applications tab (https://dev.battle.net/apps/myapps). Once created, the app will provide with a Key and a Secret. 5. On your WordPress, you must go to "Settings" > "WoWpi Settings" screen, and fill those in, including the Region and Locale, Realm, and Character Name. = Use it inside themes as PHP function = **wowpi_show_character()** After you've set up the plugin, you can output the character data in your theme by using the wowpi_show_character() function: `` The code above will output character name, profile picture, guild, main title, level, race and class. For aditional information regarding the character, you must pass the function an array with the data you want retrieved: - 'achievement_points' - will output the achievement points your character has; - 'achievement_feed' - will output the achievement feed of your character; - 'kills' - shows how many honorable kills your character did; - 'professions' - enumerates the character's professions and their levels; - 'gear' - outputs the gear that the character is having; - 'talents' - shows the talents that the character has enabled. For example, in order to get the talents and the gear of your character, you can insert the following php code: `` You can also insert another character, different than the main one (the one you've set up in the settings), by mentioning the character name as a second paramenter of the function: `` **wowpi_get_guild_tabard($guild_name = null, $realm = null)** Returns you the url of the guild tabard, created by http://tabard.gnomeregan.info/ using the data received from the API. $guild_name and $realm are optional parameters. If you don't pass them, the tabard retrieved is the one that belongs to the character you've set up in the administration panel of WoWpi. = Use it as a widget = You can also use the plugin as a widget, by going to the Widgets inside your administration interface... I do not think this needs more explaining. = Shortcodes? = You can use the following shortcodes inside your posts (or templates...): `[wowpi_character]` '[wowpi_character]' allows you to show a character data sheet. The shortcode also accepts suplemental parameters. These are: *name="Name of character"* - allows you to show characters that don't necessary belongs to you (like the one you've set inside the WoWpi Settings page) *realm="Realm"* - allows you to show characters from another realm *show="talents,gear"* - allows you to only show specific parts of the character sheet (although the name of the character, title level, race and class will always appear - you can hide them by applying css, if you want to). You can show the following: achievement_points, kills, professions, gear, talents (all of them are shown by default) *type="condensed"* - allows you to choose between to types of tables (and designs). You can choose between "condensed" and "extended". *id="caracter_table"* - you can add an id to the html table element if you want to *class="table table-striped table-condensed"* - you can add a css class to your html table. If you do not mention the class name, the default class name inserted by the plugin will be ".wowpi_character_data". `[wowpi_guild_members]` '[wowpi_guild_members]' allows you to show your guild's members. The shortcode also accepts suplemental parameters. These are: *guild="Name of Guild"* - allows you to show members of another guild, not the guild that your character belongs to (the one you've set inside the WoWpi Settings page) *realm="Name of realm"* - allows you to show members of another realm's guild *id="the_roster"* - you can add an id to the html table element if you want to *class="table table-striped table-condensed"* - you can add a css class to your html table. If you do not mention the class name, the default class name inserted by the plugin will be ".wowpi_guild_roster". *order_by="rank"* - you can set an order in which the members of the guild will be displayed. You can choose between: name, rank, realm, class, race, gender, level and achievement_points. *direction="ASC"* - you can set the direction by which the ordered members are shown, either ascending (ASC), or descending (desc) `[wowpi_tabard]` '[wowpi_tabard]' allows you to output an image with your guild's tabard. When retrieving the Guild Tabard, the plugin uses the great tabard creator that can be found here: http://tabard.gnomeregan.info/, and saves the tabard in the uploads directory. The shortcode also accepts suplemental parameters. These are: *guild="Name of Guild"* - allows you to show the tabard of another guild, not the guild that your character belongs to (the one you've set inside the WoWpi Settings page) *id="the_one"* - you can add an id to the img element if you want to. *class="my_tabard"* - you can add a css class to your img. If you do not mention the class name, the default class name inserted by the plugin will be ".crest" == Frequently Asked Questions == = Are there any bugs? = I sure hope not, but this being my first plugin I can't guarantee for everything. Anyway, you can at any time write me at avenir.ro@gmail.com or use the forum to report any issues or ask for more things. Also, please, do tell me if the plugin needs something else added or if you have some styling proposals. == Changelog == = 2.0.0 = Started adding language support = 1.1.9 = Added a new shortcode [wowpi_character] Started translations... a reason for version 1.2 = 1.1.8 = Added "order_by" and "direction" as options for [wowpi_guild_members] Names of the members in [wowpi_guild_members] will act as links toward the battle.net armory. = 1.1.7 = Added the [wowpi_tabard] shortcode and wowpi_get_guild_tabard() function = 1.1.6 = Some errors repaired... not worth mentioning = 1.1.5 = Added the [wowpi_guild_members] shortcode = 1.1.4 = Added option to include the Wowhead tooltip script. = 1.1.3 = Changed the class name for the character container. Can break compatibility if you have your own css... = 1.1.2 = Working on guild output = 1.1 = * [enhancement] added a new view wowpi_show_guild(); * [bug] removed “of the” when the character has no guild; = 1.0 = * The first commit