开发者 | avenirer |
---|---|
更新时间 | 2019年2月3日 23:35 |
捐献地址: | 去捐款 |
PHP版本: | 3.0.1 及以上 |
WordPress版本: | 4.9.8 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/wowpi/
directory, or install the plugin through the WordPress plugins screen directly.Plugins
screen in WordPress.<?php if (function_exists('wowpi_show_character')) { wowpi_show_character(); } ;?>
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:
<?php if (function_exists('wowpi_show_character')) { wowpi_show_character(array('talents','gear')); } ;?>
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:
<?php if (function_exists('wowpi_show_character')) { wowpi_show_character(array('kills','professions'),'Thonk'); } ;?>
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 through its widgets, 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). You can also use "[username] - Guild name" or [nickname] - Guild name" if you want the plugin to take the name of the character from logged in username/nickname.
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, achievement_feed, kills, professions, gear, artifact_weapon, 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".
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
ranks="9,8" - allows you to show only members with a specified rank
rank_names = "0:The Big Boss|1:The subordinates|2:The others" - if you want to be original, you can name the ranks so instead of "Rank 1" another name may appear, like "The Others". Please take note that, the guild master's rank is "0".
id="the_roster" - you can add an id to the html table element if you want to. This should happen only if you have more than one guild roster table on the page.
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="1|asc" - you can set an order in which the members of the guild will be displayed. You need to pass the column number and eventually the direction of the ordering (by default it is ascending: examples: order_by="2"; order_by="4|desc").
rows_per_page="25" - you can set the number of rows displayed on each "page" of the table. Imagine you have a huge guild with many players. You don't want to display a huuuuge page with all the members, so you can decide how many members should be displayed on every "page" of the roster.
direction="ASC" - you can set the direction by which the ordered members are shown, either ascending (ASC), or descending (desc)
linkto="advanced" - as you can imagine, every character inside the roster has a link that sends the users to the official World of Warcraft website (the character's page). By default the page that the user is sent to is the "simple" one. If you want to send the user to the "advanced" view you can pass this parameter with either "simple" or "advanced" as values. You may aswell link the character name to an internal page or another website by passing the base url as value. If for example you have an address where you present each character like: http://wowblog.com/character/CharacterName, you should pass "http://wowblog.com/character/" as value for linkto.
paginate="false" - by default, the table is paginated (imagine what would happen if the guild had more than a hundred members...). If you don't want the table to be paginated, you can use this parameter passing it "false" as value.
hidecolumns="2,3" - maybe you don't want some columns in the table to be shown. You can do that by passing the "hidecolumns" parameter and giving it the number of the column(s) you want to hide.
table_style="profile_picture|notop" - table_style changes the way the table is shown. For example, if we put "profile_picture" as value for table_style, this will make the shortcode to show the profile pictures of the guild members in a column, instead of race and class columns. PLEASE TAKE NOTE THAT, DEPENDING ON THE NUMBER OF MEMBERS IN THE GUILD ROSTER, AT LEAST THE FIRST LOAD MIGHT TAKE "FOREVER" TO RETRIEVE THE AVATARS OF THE CHARACTERS. You can mention more than one elements inside the table_style as values, by separating them with a vertical pipe. Besides the "profile_picture" you may want to eliminate the top part of the table (the one that allows users to set the number of members per page and the search input). You can do this by using the "notop" value.
[wowpi_tabard]
'[wowpi_tabard]' allows you to output an image with your guild's tabard. When retrieving the Guild Tabard, the plugin uses my tabard creator (http://wow-hunter.ro/tabard-creator) , 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"
[wowpi_guild_progression]
'[wowpi_guild_progression]' shows a table with all the dungeons and raids made by the guild (completed or not).
[wowpi_realms]
'[wowpi_realms]' allows you to show your realm status. The shortcode also accepts suplemental parameters. These are:
realm="Realm name" - allows you to show a specific realm status (not the one that your character belongs to). You can mention more than one realm if you separate the realms using a pipe "|".
battlegroup="Name of battlegroup" - allows you to show the statuses of all the realms that belong to a battlegroup
view="battlegroup" - If you don't know what battlegroup your realm is part of, you can name the realm (or don't name it if it's the same as your character's), and use view="battlegroup". All realms of your realm battlegroup will be shown.
show = "status|type|population" - if you want to show more than just the status of the realm you can mention what you want to be shown by separating them with a pipe "|". The widget can show the status, the type of the realm (RP, PVP, RPPVP), and the range of the population (low, medium, high).
class="my_own_css_class" - you can add a CSS class to your realm status table.
[wowpi_guild_achievements]
'[wowpi_guild_achievements]' allows you to show your guild achievements. 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
class="personal_class" - you can add a css class to your list.
limit="none" - you can set a limit of achievements. You can show only the last 10 of them by using limit="10"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.