I was wondering if anyone knows a way to override the "updated" and "new" marked behavior for content.

Currently I am using a view (the included default tracker view) to display all updated threads in a forum. Design-wise having "updated" and "new" doesn't cut it. I would prefer to switch the marked behavior to not display the text but instead append a CSS class to the link.

I was able to do this by modifying the templates for advanced forum when browsing the forums, but when using the views module I have not found a way to make this change.

It looks like the views module calls

      return $this->render_link(theme('mark', $mark), $values);

But from there it gets a little dicey. I would also prefer to not modify the views module but if needed I will for this feature.

Thanks.

Comments

michelle’s picture

I didn't even know that theme function existed. AF has it wrong. I'll have to fix that. What you need to do is override theme_mark ( http://api.drupal.org/api/function/theme_mark ) with your own theme function. From your theme's template.php, you can use THEMENAME_mark for the function name and then copy the rest in and edit as needed.

Michelle

NitroPye’s picture

Thanks a ton.

I'm going to try and figure out a solution with overriding that function. Only problem is the mark text is appended to the link and called where as I'm trying to append:

class="adv-forum-topic-updated"

Before mark is called. I might have to get hacky unless someone else has a clever idea.

michelle’s picture

Well, you can edit the views template files... But I haven't done anything with theming views in D6, yet, so I'm no help there.

Michelle