It would be really nice if there where themefunctions!!!! So here is my start:

at the end of the file timeline.module

function theme_timeline_bubble_body($body,$nid){
	$out = $body . '<br/>' . l(t('edit'),'node/' . $nid . '/edit');
	return $out;
}
 
/**
	implementation oh hook_theme
*/
function timeline_theme(){ 
	return array ( 
    'timeline_bubble_body' => array (
      'arguments' => array ('body','nid'),
 
      
    ),
	);
}

An here line 287

case 'body':
              foreach ($field as $body_field) {
                $view->field[$body_field['id']]->pre_render($item);
                $event['description'] .=  theme('timeline_bubble_body',$view->field[$body_field['id']]->render($item),$item->nid);
              }
              break;

This is a start.

Comments

jmiccolis’s picture

Thanks for giving this a go!

Patch files are much easier to work with for this stuff, please take a look at http://drupal.org/patch/create

Also, FYI I'm wondering if there is a better way than the current convention to assign fields to title, times, etc. So this code may be getting reworked shortly. I'd like to let people use a UI to assign the fields, and not need to read up on how it works.

rapsli’s picture

Problem is. This theme function is not very generic. Meaning it needs as title the $nid. Maybe it would be easier to have some settings ui...

xamanu’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs review » Needs work

targeting 6.x-2.x branch.

we need a more generic solution on that. Let's think about it.
There is another feature request that I marked as duplicate, but should be considered within this issue: #313722

xamanu’s picture

Status: Needs work » Fixed

The three main elements of the event bubbles are running through theme functions now:

theme_timeline_bubble_title()
theme_timeline_bubble_url()

and the event bubble body is generated by views rendering, so views' theme functions can be used to alter them to your needs.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.