How to display a QR code based/produced on of the URL of each item

More
8 years 10 months ago - 8 years 9 months ago #54869 by charlynancy
Hi,
If you want to display QR code image you could use Google API for this.
What you have to displayed ?
This html code :
Code:
<img style="-webkit-user-select: none" src="https://chart.googleapis.com/chart?chs=200x200&amp;cht=qr&amp;chl=http://XXX_URL_OF_YOUR_ITEM.com">
Explanations :
chs=200x200 : size of the QR code image
chl=http://XXX_URL_OF_YOUR_ITEM.com : URL of your item

How you could insert that in your template?
Example of what i added in /components/com_flexicontent/templates/default-OR-YOUR-DIRECTORY-TEMPLATE/item_html5.php

1. GET THE URL OF THE ITEM
Code:
<?php //Get the full URL of the item $uri = JFactory::getURI(); $absolute_url = $uri->toString(); ?>
2. DISPLAY THE QR code IMAGE
Code:
<img style="-webkit-user-select: none" src="https://chart.googleapis.com/chart?chs=200x200&amp;cht=qr&amp;chl=<?php echo $absolute_url; ?>">
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #54909 by ggppdk
Hello

so can easily make a simple field to do this, i mean for:

item URL to QR code

-- but possible the text field should, also have an option to convert text value to QR code :-)
although it is possible to convert it but using prefix/suffix, still via parameters it will be easier


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #54962 by charlynancy
Hello,
i tried to use prefix and suffix
but i dont know how to get item url without using PHP inside the template?
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #54975 by micker
as tu essayé avec un plugin ex
extensions.joomla.org/extensions/extensi...le-qr-code-generator
demo
www.ntounas.gr/joomla/43-plugins/86-qr-code-generator#demo
usage
triggering plugin yes
prefix {qrcodegenerator }
suffix {/qrcodegenerator }
... simple

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #54977 by ggppdk

charlynancy wrote: Hello,
i tried to use prefix and suffix
but i dont know how to get item url without using PHP inside the template?


Hello

i meant for QR code on some text field value,
so for some other usage different than the one in your case,

- we do not provide a way to get current item URL inside a text field


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #54978 by charlynancy
Salut Yannick,
Oui j'ai déjà essayé, mais ce plugin, ne fonctionne pas avec Joomla 3.
Le seule qui est opérationnel avec Joomla 3 est module QR code (QR code friendly)
Je l'utilisais avec le champs affichage du module de FLEXIcontent.
Mais comme il utilise l'API Google, je me suis dit qu'il serait plus simple que FLEXIcontent se connecte directement à l'API Google.

Tout cela fonctionne bien mais j'ai été obligé de passer par l'ajour de PHP (récupération de l'url de l'Item) dans la template.
Si je savais comment récupérer l'URL de l'item via une fonction ou code FLEXIcontent, ça serait vraiment plus simple pour les autres membres.

Il me sembre que j'avais vu une doc ou un topic sur l'ensmble des codes que l'on pouvait passer dans les suffix. Mais je suis incapable de retrouver cette doc (d'ailleurs je pense que c'est certainement toi qui avait du la rédiger :) )

Bref s'il existe un code du type {{field_URL_item}} ça serait vraiment utile.
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.307 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline