plugin by mykaDragonBlue
I intend to add greater functionality and make this a general utility plugin as i go on with it.
Installation is a simple process:
News Post Avatars
NOTE: you will recieve errors if you have added a call to the plugin to your theme, but the plugin is currently inactive
TODO: maybe default to no code generated instead of 'blank.jpg' avatar
Uploading an Avatar
Before an avatar can be uesd by a user it must be uploaded to the server. go to the mmUtility page in the Administration section of Xcomic. below the display of avatars currently on the server is a file selection box that can be used to chose a new Avatar to upload from your local computer. once you have selected a file, press the 'Upload It' button and guess what should happen...
Assining an avatar to a user
In the mmUtility section of the Xcomic Administration panel, find the user you want to assign an Avatar to in the 'Users Avatars' table. click on the 'Edit' button at the right to go to the Avatar selection page. When in the Avatar Selection Page, simply click on one of the available Avatars to assign it to the current user.
Using Avatars in news Post
In order to display users avatars in news posts, you must edit the theme you are using. Find the news_display.php file in your theme folder, then simply add <?php out('getAvatar'); ?> where you want the avatar to be displayed. This will output an <img /> tag with class="avatar" (for use with css). Adding the appropriate section you theme's css file should allow you to appropriatly format the display of an avatar.
Optionaly, you can use <?php out('getLinkToAvatar'); ?> if you want to return only the file path of the relevant avatar. This call will output something like avatar/filename.ext so that you can apply your own image tag in the theme.
Using Avatars outside of news posts
You can also call an avatar from outside a news post by using either getAvatar or getLinkToAvatar. In order to do this, you must manually supply the user who's avatar you want to retrieve. This is done by adding a second argument to the get() or out() call. For example <?php out('getAvatar', 'admin'); ?> outputs an <img /> tag pointing to the avatar for user admin.