Is the theming documentation in the handbook valid for the 2.x branch as well? I notice with the tokens I can set it up to link to my node id, but if I'm aliasing my URLs I want to be able to link directly to them.

I also want to be able to reformat my dates as 'time ago'.

Can I put php into these activity publisher templates? And if so, perhaps they could be more than one row in size?

Thanks for a great module.

Comments

Scott Reynolds’s picture

Status: Active » Closed (fixed)

Is the theming documentation in the handbook valid for the 2.x branch as well?

Nope :-(

I notice with the tokens I can set it up to link to my node id, but if I'm aliasing my URLs I want to be able to link directly to them.

Ya we have realized this too. I think for activity, we should provide common tokens for node and comment links. These tokens will be generated from url() function

I also want to be able to reformat my dates as 'time ago'.

this is done through the Views UI

Can I put php into these activity publisher templates? And if so, perhaps they could be more than one row in size?

See this issue: #485436: Activity publisher as theme hooks. That is a better approach then using PHP as a bandaid. We are having a couple talks about how to best attack this still.

edit:A lot of the theming is done via Views theming. Because all the displays are Views displays. The Views template system is VERY powerful.

sirkitree’s picture

Component: Code » Documentation
Status: Closed (fixed) » Active

I'd like to keep this open as a documentation resource. Thank you for responding here Scott.

bflora’s picture

I've got a node type that users can attach images to via a CCK image field. I'd like to show the thumbnail for the attached image in the activity messages created when someone makes a new node.

Should I use php inside the activity template for the create node messages to generate the imagacached thumbnail for the image. Is there a better solution?

Scott Reynolds’s picture

Should I use php inside the activity template for the create node messages to generate the imagacached thumbnail for the image. Is there a better solution?

That won't work.

Generally, I suggest using the Node relationship for the View. This will get you a non-required relationship to the Activity record and allow you to surface as many or as little thumbnails as you want for only the matching records.

bflora’s picture

Thanks, Scott.

After playing around with this some more, I've figured out how to create a custom template file for rows in this view and how to test for what node type is being presented in each activity item. This gives me access to PHP and all the variables and objects needed to theme things properly.

sirkitree’s picture

Status: Active » Closed (fixed)

I've changed my mind on keeping issue open for documentation purposes :P