Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm working a small home project, and I wish to dynamically produce a QR code on a content Node (I'm using the Drupal 7.3x CMS framework and specially the Barcode Module). I've not had much success in getting the currently viewed content Nodes' URL to print on the page and my PHP is very minimal, I have an in-clinging what needs to happen but not sure what next. The primary purpose is to merely show a QR-Code on every particualr Node content type so that a use has an option to scan it with a QR barcode reader device (ie smartphone). The result found shall be reused over a number of future project ideas.

I asked a similar question on Drupal Answers and a reader responded by suggesting that the:

"barcode_theme seems to tell it can be exploited directly. print theme('barcode_image', array('barcode_value'=>'http://...', ...etc))"

I presume that the PHP code would action after a Node content has loaded and dynamically load the rendered QR *(.png) image onto the page (in my case, in the View template). I have no idea how to this and would like an answer on what need to be done to accomplish a result. May I add, that the QR barcode .png image successfully renders if it isadded to a filed within the Node type from a Content Add Form at the user frontend (for example add a URL: www.johndoe.com), so at least I know the Barcode module is successfully rendering the added field data.

Any advice or code process on generic 'how to' on such a standard requirement is greatly appreciated, thanks in advance.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.