• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

The permanent link QR-code

infis

Well-known member
#1
Recently QR-codes become more and more popular. Therefore why not to add in a window of a permanent link display including QR-code for it?
In general it is not difficult, though demands template modification post_permalink and adding of two phrases in language.

1. We open a template post_permalink and we search there for the following code:
Code:
        <ul class="Tabs tabs" data-panes="#IpPanes{$post.post_id} > li">
            <li><a>{xen:phrase bb_code_link_snippet}</a></li>
            <li><a>{xen:phrase html_link_code}</a></li>
We add at once under it:
Code:
            <li><a>{xen:phrase qr_code_image}</a></li>
In the same place hardly it is more low found:
Code:
        <ul id="IpPanes{$post.post_id}">
            <li><label><input type="text" dir="ltr" class="textCtrl fillSpace" id="bb_code_link_snippet" value="[URL=&quot;{xen:link full:threads/post-permalink, $thread, 'post={$post}'}&quot;]{$thread.title}[/URL]" />
                <span class="explain">{xen:phrase bb_code_link_snippet_explain}</span></label></li>
            <li><label><input type="text" dir="ltr" class="textCtrl fillSpace" id="html_link_code" value="&lt;a href=&quot;{xen:link full:threads/post-permalink, $thread, 'post={$post}'}&quot;&gt;{$thread.title}&lt;/a&gt;" />
                <span class="explain">{xen:phrase html_link_code_explain}</span></label></li>
We add at once under it:
Code:
            <li><label><a href="http://qrcoder.ru" target="_blank"><img src="http://qrcoder.ru/code/?{xen:urlencode {xen:link full:threads/post-permalink, $thread, 'post={$post}'}}&4&0" width="132" height="132" border="0" title="QR код"></a>
                <span class="explain">{xen:phrase qr_code_image_explain}</span></label></li>
2. Now we will need to add two phrases (title of the tab and the description).

qr_code_image - "QR-code"
qr_code_image_explain - "The Two-dimensional code for scanning by the mobile device"

3. Result on a screenshot (in Russian, but it is not basic)
qr_code_image_example.png
 

infis

Well-known member
#3
1. It can be applied and to a profile of the user, I generate vCard in the form of a QR-code. On some resources it can be very claimed.

2. qrcode.ru it is possible to replace the online generator with another, allowing to generate the codes through transmission in parameter URL.

3. Unfortunately, is not present xen:hook for an insertion of the code of the additional tab. Then it would be not necessary to correct manually a template.
 

Wulfspider

Active member
#5
Another option for an API to generate these would be:
Code:
            <li><label><img src="http://api.qrserver.com/v1/create-qr-code/?size=132x132&data={xen:urlencode {xen:link full:threads/post-permalink, $thread, 'post={$post}'}}" border="0" title="QR Code" />
                <span class="explain">{xen:phrase qr_code_image_explain}</span></label></li>
You can specify the size in the URL or simply with the width and height img parameters.
Code:
            <li><label><img src="http://api.qrserver.com/v1/create-qr-code/?data={xen:urlencode {xen:link full:threads/post-permalink, $thread, 'post={$post}'}}" width="132" height="132" border="0" title="QR Code" />
                <span class="explain">{xen:phrase qr_code_image_explain}</span></label></li>
 
B

bogus

Guest
#6
whats the sense of that? Sry i see them everywhere but i have no idea what the use in forums?