Hi

it seems that either I am missing something or using tokens does not work.

i created the block, it shows. I added text ... it creates the image. I put in a token [nid] ... no joy ... it keeps [nid] as text.

what am I missing ?

I wanted to upscale the image using imagecache ... no joy either.

Any tips?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AlexisWilke’s picture

I have the same problem with 6.x-1.x, the tokens don't seem to work.

Not only that, once I changed the block contents, I cannot delete it and get the default URL as you first get. Now it returns '@' (i.e. considered an empty string.)

Did not try the imagecache feature.

Thank you.
Alexis Wilke

Quick look at the code: nodes and users are managed, but not other pages! we may want to add the global tokens too? because something like [node-url] is not transform if you're not on a node...

AlexisWilke’s picture

Issue tags: +theme, +tokens
FileSize
2.3 KB

Okay, the reason why the image cache doesn't work is because the theme declaration is broken! The number of parameters in the theme_qr_codes() doesn't match the declaration and the call in the block code. (see patch)

Since the [node-url] is specific to nodes (and thus should be used with a "show only on pages" using pattern "node/*",) maybe we could at least offer 3 blocks instead of just one. That way someone who has a view could also include a QR code for that specific view with possibly a hard coded URL...

Of course, the QR Codes module could also add support for a [url] token that would simply put the current page url in there (which I think a lot of people would appreciate) using the str_replace() command (instead of the tokens, so that way tokens is not necessary and if the block data is empty, it's considered to be equal to [url].) What do you think?

Just a side note: when I first installed the block, the title said "QR Codes" and showed ONE code. Not the end of the world since I'd rather not have a title anyway, but I thought I'd mention it.

AlexisWilke’s picture

Assigned: Unassigned » AlexisWilke
Status: Active » Needs review

Fixed status.

AlexisWilke’s picture

There is another patch to generate a default [url] tag so just installing the block works. Also, the [url] tag can be used by the end users too. I did not fix the inline documentation though.

This works great for me. 8-)

The url uses the canonical URL as defined in globalredirect (and that works perfectly.)

Thank you.
Alexis Wilke