1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.
    Dismiss Notice
  3. 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

Discussion in 'Template Modifications [Archive]' started by infis, Nov 4, 2011.

  1. infis

    infis Well-Known Member

    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:
            <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:
                <li><a>{xen:phrase qr_code_image}</a></li>
    In the same place hardly it is more low found:
            <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:
                <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)
  2. Fuhrmann

    Fuhrmann Well-Known Member

    Thank you for this.
  3. infis

    infis Well-Known Member

    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.
    MarcosPreviato and Fuhrmann like this.
  4. MarcosPreviato

    MarcosPreviato Active Member

    Cool, very nice modification! thanks man! :D
  5. Wulfspider

    Wulfspider Active Member

    Another option for an API to generate these would be:
                <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.
                <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>
    Brandon Sheley likes this.
  6. bogus

    bogus Guest

    whats the sense of that? Sry i see them everywhere but i have no idea what the use in forums?
  7. Wulfspider

    Wulfspider Active Member

    QR codes can be used to copy long URLs and going to them instantly instead of having to type the whole thing in manually.
  8. steven s

    steven s Well-Known Member

    Other than by a smartphone, how else would they work?
  9. Wulfspider

    Wulfspider Active Member

    I don't really see any other use unless you were UPS and had a need for scanning websites. :p
  10. Brandon Sheley

    Brandon Sheley Well-Known Member

    nice added and thanks for the non-.ru generator
    added :)
  11. infis

    infis Well-Known Member

  12. justwordme

    justwordme Active Member

    I'm a n00b does this just create a spot for the QR code or does this generate and insert?
  13. Wulfspider

    Wulfspider Active Member

    You follow the steps and it adds it where it talks about in the steps. You could put a QR code in any template though.

Share This Page