Release Notes for uKnowva 2.4.4

For Our Developers

  • Developers have help in creating system workflows using the newly pluginified ConvHelper::addNotification() function. The new event is onStoreGlobalNotification($notification). $notification is an array which has the following keys:
    • user_id: the id of the user
    • content: the HTML content of the notification
    • link: the link of the notification; basically, this is the link where the user should go after clicking on the notification
    • type: the type of the notification
    • icon: the icon for the notification; it is an image
    • readonlyonce: specify whether the notification is readonly once or not
  • Pluginified sendMessage too. Now, whenever a user sends a personal message, plugins of type user and community shall be fired. These plugins are currently used to trigger notifications to phones. The event is
    onSendMessage($message,$receipients,$isreply)
    • $message is an array with following keys:
      • id
      • from: user who sent the message
      • posted_on: date
      • from_name: name of the sender
      • subject
      • body
    • $receipients is an array of recipients’ user ids
    • $isreply is a Boolean, which is true in case of a reply and is false in case of a new message
  • Added functions: ConvHelper::isImmediateSuperior and uknowvaFactory::getUser()-->isImmediateSuperiorOf(). Both functions return Boolean values
  • Added the below code in com_community/libraries/core.php to make sure Croute looks into other menus as well instead of just the Apps toolbar for itemids (CRoute makes SEF URLs)
    if(empty($val)) /* if nothing found in the apps toolbar, get it from convhelper method
    $val = ConvHelper::getComponentItemid('com_community&view=' . $view);
  • Added metadata.xml in com_community/views/notification
  • Added a request cleaning script in the ajaxadd() function of sending message in inbox.php controller in com_community
  • Added functions for getting a user’s immediate subordinates in ConvHelper.php: ConvHelper::getImmediateSubordinates() and uKnowvaFactory::getUser()->getImmediateSubordinates()
    • When $groups is passed, only subordinates belonging to that group shall be returned
      public function getImmediateSubordinates($groups = array()){ 
      return ConvHelper::getImmediateSubordinates($this->id,$groups); 
      }
      
  • Added the code parent::__construct($id); in CUser constructor to make sure it calls its parent class constructor too. Same done for the JUser constructor as well
  • Added the function getDocsFolderPath() in convhelper that gives the root path of docs
  • Introduced the goBack function in JApplication class, it simply redirects to the last page
  • Added a new function for Silent Dump (sdump). This will add HTML comments to all var_dumps. It is called as follows:
    sdump($var1);
    sdump($var1,$var2,$var3);
  • Added the following code in uploading label in uknowvaui class. This was done for IE, as when files are getting uploaded the percentage is not displayed. A loader will be now displayed instead 
    <img src=\"/images/loader.gif\" />
  • Updated the following code in apps.php in com_comumunity/libraries (changed from $arrayParams to $user)
    $obj->data = $plgObj->onProfileDisplay();
  • Added two more functions getTimeZone and getTimeZoneOffset in user.php which has class JUSer
  • Added the getCompleteProfile() function in Cuser class. This function gives the complete profile of a user as an associative array with the fieldcode as key
  • Added the verifyPassword() function in JUser class. This function rechecks the current user’s password before carrying out sensitive tasks (for e.g., exporting user list)
  • Added the function pushFile() in uvwdocs file model. This function will push files created in other locations of uKnowva to the uKnwova Docs System. For e.g., if a user uploads a file in My Documents on his profile page, that file will be automatically moved to the Document Reporsitory
    • $filepath is the physical location of the file and options could have keys like title, cat_id, access_level, etc.
    • If self_destroy=true, the file located at $filepath will be deleted after copy
    • If replace_existing = true, then any existing file with same name will be deleted and the new file be replaced, else the file will be renamed and saved
      function pushFile($filepath,$options=array(),$userid=null,$self_destroy = true,$replace_existing = false){ 
  • Added an effective way of calling plugin functions securely from plugin themselves: The following functions have been written in class JPlugin ()
    • getHookKey()
    • getHookURL()
    • unsetHookKeysFor()
    • unsetAllHookKeys()
    • unsetHookKey
    • Also added its function in com_custom controller: triggerHook()
  • Introduced a new way to declare select lists—just give class="uselect" to get searchable and much user friendly select lists. You can specify the rel attribute as well like it is done in toolTip class
  • Added the option of numeric fields in type=text fields in com_community
  • Included juserhelper class by default in user.php of Joomla!
  • Added $this->item->created_by == JFactory::getUser()->id; in canedit property in com_content/article/default.php to make sure edit access is provided to the person who created the content
  • Introduced the function getGroupByID in JUserHelper class to get groups info by id
  • Added code such that only admin users will see failed cache deletion message. Refer this post for more info
  • Added the group filtering options in JUser's and ConvHelper's superior and subordinate functions. Developers can extract superiors and subordinates of users in a particular user group by passing group id
  • Added another param called @$check_referer in JRequest::checkToken function; if the $check_referer is false, then $_SERVER['HTTP_REFERER'] will not be checked
  • Set content-encoding as uknowva in reponse.php in function compress
  • Added the parameter of Allow resetting of passwords for remote authentication in com_users options
  • Added the strip_tags and substr in photo search of community search plugin
  • Since the dynamic setting of memory limit does not work in windows, added the windows check in convhelper::forceDownload function
    if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN'){
  • Renamed Lock user to Disable user in com_community language filer
  • Added the register_shut_down function in loader.php to handle PHP fatal/parse errors. The error page is now displayed for fatal/parse errors
  • Added strip tags to title tag in fetchHead() of JDocumentRendererHead in /libraries/joomla/document/html/renderer/head.php
  • Added params in com_users to allow reset of name/email from frontend by users
  • Developers can now get the itemid of a component by entering its name. Added a parameter in convhelper::getcomponentitemid() called $return_current. It returns the itemid associated with a component if a link to this component is available in the menus table. Its function definition is:
    getComponentItemId($component_name,$strict = false,$return_current = true)