hi
I am installed the five start module,

I developed the custome module , name of module is event

I am displaying event title,name,and star voting ,

How to display this star voting into the custom event,

Expecting best solution

Comments

bonaparte’s picture

I saw similar repeated questions in forums and mailing lists. It is very hard to understand your question without much details. Are your events nodes? Post your code here so that we can see what's going on in your module.

People who help here on forums and on mailing lists do not compete with each other. And your expectation of best solution may turn down few who intend to help.

--------------------
Sudheer. S
Binary Vibes Information Technologies Pvt. Ltd.
LAMP
Binary Vibes

bharanikumariyerphp’s picture

Here i have attached my block code,this block display the

Event title , location , contact person and all, with this i want to add five star voting,

<?php


function cEvents_block($op = 'list', $delta = 0){
	 

		switch ($op){
			
				//this is array for display the caption for the block
				case 'list':
					$blocks[1]['info'] = t('cEvents');
					return $blocks;
			
				case 'configure':
					if ($delta == 0) {
					$form['approval_block_num_posts'] = array(
						'#type' => 'textfield',
						'#title' => t('Number of pending comments to display'),
						'#default_value' => variable_get('approval_block_num_posts', 5),
						);
					}
			return $form;
			
			case 'view':
			
		 
		 if(arg(0)=='node'){
		 
		
		 
	//	$modpath = drupal_get_path('module', 'cEvents');
  //drupal_add_css($modpath .'/cEvents.css', 'module');
				$num_rows=db_num_rows(db_query("select nid from node where type='events'"));
				if($num_rows>0){
					if ($delta == 1 ) {
					
				//drupal_add_css(drupal_get_path('module', 'cEvents') .'/cEvents.css');
						$sql ="select cn.nid,cn.field_contact_person_value,cn.field_sponsor_value,cn.field_location_value,nr.title,nr.body,nr.teaser from content_type_events as cn,node as n ,node_revisions as nr where nr.nid=cn.nid and n.type like 'events' and n.nid=nr.nid";
	
		//$cEvents_block[] = "<div class='column2-unit' >";
	
	
			$result = db_query_range(db_rewrite_sql($sql), 0, 5);
			 while ($node = db_fetch_object($result)) {
	         $cEvents_block[] .=l($node->title,"node/".$node->nid)." <br>Sponser &nbsp;".$node->field_sponsor_value."<br>contact person &nbsp;".$node->field_contact_person_value."<br>Location &nbsp;".$node->field_location_value;
			 }
			 
				// $cEvents_block[].="</div>";
			 	$block['subject'] = t('Events');
				$block['content'] = theme('item_list_ameex', $cEvents_block);
			}
		return $block;
		}
	}
  }
}
bharanikumariyerphp’s picture

Dear problem fixed