Closed (fixed)
Project:
Activity
Version:
6.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Jun 2009 at 11:23 UTC
Updated:
11 Sep 2010 at 22:34 UTC
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
Comment #1
Scott Reynolds commentedNope :-(
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
this is done through the Views UI
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.
Comment #2
sirkitree commentedI'd like to keep this open as a documentation resource. Thank you for responding here Scott.
Comment #3
bflora commentedI'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?
Comment #4
Scott Reynolds commentedThat 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.
Comment #5
bflora commentedThanks, 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.
Comment #6
sirkitree commentedI've changed my mind on keeping issue open for documentation purposes :P