Walls System


This page is obsolete
This article is written for older versions of JomSocial. While chances are that is still valid, It could contain images and information that are not. Are you interested in helping us making best documented Joomla! extension in the world and improve this article? Then click here to find out how.

Background on Wall Features

Walls / comments is simply a commenting system in JomSocial. It allows comments to be placed through Third-Party applications within the system just like the walls / comments you see on the core applications. Before even beginning to write the code to integrate the walls / comments into your Third-Party application, you should have a solid understanding of how JomSocial works and should try to have at least a little knowledge about the Joomla MVC framework.

Including Necessary Libraries

The first step, is to include the necessary library so that your application can start using them.

require_once( JPATH_COMPONENT . DS . 'libraries' . DS . 'wall.php' );


After including the necessary files, all you have to do now is to get the form for the walls /comments and the contents of the walls / comments.

Getting the forms
To get the form's HTML content, you simply need to issue the following block of codes. The parameters are explained below,

$form = CWallLibrary::getWall( $uniqueID , $applicationName );

$uniqueID : This parameter is required and it tells the wall system that a wall / comment is made on this specific unique id.

$applicationName : This parameter is required and it tells the wall system to call your AJAX methods within your class. It should always have the prefix of 'plugins,' followed by your application name. E.g:

This example, selects the unique id for the specific image that is being commented on.

$db    =& JFactory::getDBO();
$query = 'SELECT `id` FROM ' . $db->nameQuote('#__myapplication_images');
$db->setQuery( $query );
$uniqueID = $db->loadResult();
	JError::raiseError( 500, $db->stderr());