• Page:
  • 1

Introducing onAvatarStatusOverlay event for user and communigy plugins

OFFLINE

Introducing onAvatarStatusOverlay event for user and communigy plugins

3 years, 9 months ago
What id does?

onAvatarStatusOverlay.png


Available in 2.4.4 onwards!!

You can add overlays by writing a plugin of type user or community which has a function onAvatarStatusOverlay(), following is the function specification for the same:

	/*
	 * fired on the avatar display, using this method, you can update current status in a one liner on the user's photo
	 * @$params
	 * $user is an instance of CUser
	 * $isMine, simply states, if the current profile is same as that of current user
	 * It should return an object or array of objects hving following properties:
	 * 		text: The text that needs to be displayed. Compulsory
	 * 		title: The tooltip description explaining more about th
	 * 		color: The background color
	 * 		class: Addtional class you want to add
	 * 		Additionally, you can set other HTML attribs by creating object property like $obj->rel, $obj->id
	 * In this case, it will simply say whether the user is online or not
	 */
	function onAvatarStatusOverlay($user,$isMine){}


An example of the same is available in /plugins/community/uknowva/uknowva.php
The following user(s) said Thank You: Pooja Menon, Hirdesh Vishwdewa, Rajat Pal
  • Page:
  • 1

Upcoming Events

No events found.

Who's Online

2 users online