back to main

mmUtility plugin for Xcomic (v0.1.2)

plugin by mykaDragonBlue

I intend to add greater functionality and make this a general utility plugin as i go on with it.

Installation

Installation is a simple process:

  1. Extract the contents of the archive containing the current version of the mmUtility plugin to the root directory of your Xcomic system.
  2. Go into the administration->plugins section of your Xcomic system. You should see an entry for "michaelmedia utility plugin vX.X.X". use the option on the right to Install the Plugin. The plugins instalation process will copy a few required files to their correct locations, as well as setting up some stuff in the database.
  3. Make Sure to 'Activate' the plugin in administration->plugins after it has sucessfully installed. This is not done automatically.
  4. various functions of this plugin may require additional modifications to your theme files. See the sections regarding accessing the functionality of particular components of the plugin.

Functionality provided by this plugin

News Post Avatars

  • plugin section allows a simple call to retrieve the Avatar associated with a user
  • Admin section allows Avatars to be uploaded
  • Admin section allows users to have an avatar assigned

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

How to use the functions provided by this plugin:

News Post Avatars
  • 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.