Page 1 of 1

help with module development?

Posted: Sat Mar 15, 2008 6:23 am
by kombuwa
i am newbie to joomla modul development.
i have dveloped modul like blog.
but in side it mabots were not working.
eg:-
Conference 1
Written by Administrator
Categery Photographs
2008-03-18 03:56:29

Conference 1. 2007-50-55



{gallery}ugm/2/images{/gallery}


this is my code:

Code: Select all


		$query = "SELECT * FROM jos_content WHERE id=$con_id ";
	
	$database->setQuery( $query );
	$rows = $database->loadObjectList();
	if(count($rows) == 0){
		echo "Sorry, Data Not Found.";
	}
		
	
	
	foreach ($rows as $value) {
		
			
		$title = $value->title;
		$created_by = $value->created_by;
		$created = $value->created;
		$introtext = $value->introtext;
		$fulltext = $value->fulltext;
		
		
		
		$id = $value->id;
		
		echo "<div class='contentheading'>".$title."</div>";
		
		echo "<div class='small'> Written by ";
		$query1 = "SELECT name FROM jos_users WHERE id = $created_by ";
		
		$database->setQuery( $query1 );
		$rows1 = $database->loadObjectList();
		foreach ($rows1 as $value1) {
			echo	$value1->name;
		}
		echo "</div>";
		
		
		echo "<div class='small'> Categery ";
		$query1 = "SELECT title FROM jos_sections WHERE id = $cat ";
		//$dbase1->setQuery($query1);
		$database->setQuery( $query1 );
		$rows1 = $database->loadObjectList();
		foreach ($rows1 as $value1) {
			echo	$value1->title;
		}
		echo "</div>";
		
		echo "<div class='createdate'>".$created."</div>";
		echo "<br/>";
		//$Str_s_Y = $value->title;
		echo "<div>".$introtext."</div>";
		echo "<div>".$fulltext."</div>";
		//echo "<div>"."<a href='?option=com_content&task=view&id=$id&Itemid=1' >More...</a>"."</div>";
		echo "<br/>";
	}
i have also try this code for activte mamot on my modul.
but it also give errors.

Code: Select all

$_MAMBOTS->loadBotGroup( 'content' );
$results = $_MAMBOTS->trigger( 'onPrepareContent', array( &$row, &$params, $page ), true );