Want it so who ever looks or prints the picture it will have there user name on it.

Comments

dman’s picture

Status: Active » Fixed

Sure!
Using textactions you can put PHP code that accesses the $node object which contains a $node->name value.
Just put

return $node->name;

into the textfield and select "Evaluate as php code".
Works for image.module images. Should work the same for imagefield images.

scott815’s picture

Status: Fixed » Active

It show the user that created the image. Is it possible to show the current logged in user?

dman’s picture

Yes but no.
You can use $GLOBALS['user']->name;

But imagecache is a CACHE. Which means this will run once, generate the image with that name on, then serve that from then on.
This behaviour cannot be changed from the imagecache_actions end. You'll need entirely different code if you want to generate and image on the fly for all users all the time.

That entirely different code MAY leverage the image_api and toolkits, but I don't think it exists yet.

You may try calling that image with a ?rand=123 argument at the end, that may cause a fresh image to be created each time. Not sure how that will play with other caching though.

scott815’s picture

Ok what about when the user trys to print would that work or would another module might work for that.

dman’s picture

Same answer. The server doesn't know if they are printing or looking at it or saving the image. It just sends the image.

dman’s picture

Seeing as you are trying to get a 'fingerprint' on the file - I'm guessing for a pay-site so you can track reposters - you may post a bounty for this (new) module.
What we have is
imagecache -> imageapi -> textactions
you need
fingerprinter -> imageapi -> textactions
It's do-able, although generating images on the fly will hit your performance. May be useful for other purposes, there's been a few similar requests recently, but it needs a dynamic front-end, NOT imagecache which precludes this feature by design.

dman’s picture

Status: Active » Closed (won't fix)

Can't happen in this module