Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
QR Codes: In Templates and BB Codes Details »»
QR Codes: In Templates and BB Codes
Version: 1.0, by mmfgamer5 mmfgamer5 is offline
Developer Last Online: Aug 2014 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.x.x Rating:
Released: 08-01-2011 Last Update: Never Installs: 11
Template Edits
Re-useable Code  
No support by the author.

What is a QR Code?
For those that don't know, a QR Code is a two dimensional graphic which can be interpreted by apps such as RedLaser (iPhone/Android). They are similar in principle to bar codes. QR Codes can link to a URL, show text, write emails, etc. They are being used more commonly in the real world, and on websites to allow people to quickly go where they want to on their mobile devices.

Templates
This template modification shows a QR Code automatically where the code is placed in templates. This is useful for users if they want to quickly get to somewhere on your forum on their mobiles.

Demo: http://www.cjmmedia.com/ (see the footer of each page - it leads to the current page URL; also in the post editor, there is the BB Code)

You can place these snippets anywhere in templates.

Page URL: leads users to the current URL that they are visiting.
PHP Code:
<!-- QR CodePage URL -->
<
img src="http://qrcode.kaywa.com/img.php?s=3&d=http://www.example.com/{vb:raw relpath}" alt=""/>
<!-- 
End of QR Code --> 
This could be placed in the footer template.

Member Profile: leads users to the profile of the user the QR Code is located on.
PHP Code:
<!-- QR CodeMember Profile -->
<
img src="http://qrcode.kaywa.com/img.php?s=3&d=http://www.example.com/member.php?{vb:raw post.userid}" alt=""/>
<!-- 
End of QR Code --> 
This could be placed in the postbit or postbit_legacy template.

Post Jump: leads users to the post that the QR Code is located on.
PHP Code:
<!-- QR CodePost Jump -->
<
img src="http://qrcode.kaywa.com/img.php?s=3&d=http://www.example.com/showthread.php?&p={vb:raw post.postid}&viewfull=1#post{vb:raw post.postid}" alt=""/>
<!-- 
End of QR Code --> 
This could be placed in the postbit or postbit_legacy template.

Change http://www.example.com/ to the URL of your website. The "s=3" is the size of the QR Code. This can also be changed. Below is a size 3 QR Code.



Feedback is always welcome. If you have any nice additional snippets for QR Codes and want to add them, feel free to post them below, and I'll add them.

NOTE: The license of http://qrcode.kaywa.com states that these should be used for non-commercial use only. Please use appropriately. Also note that the Kaywa QR Code generator is currently in beta. I do not own http://qrcode.kaywa.com, nor am I affiliated with it.


BB Code
This BB Code allows users to easily generate their own BB Codes. It allows users to change the size, too.

Title: QR Code Generator
BB Code Tag Name: qr
Replacement:
PHP Code:
<img src="http://qrcode.kaywa.com/img.php?s={option}&d={param}" alt=""/> 
Example: [qr="4"]http://www.example.com[/qr]
Description: Generates a QR Code based on the URL and size.
Use Option: Yes
Button Image:
Remove Tag If Empty: Yes
Disable BB Code Within This BB Code: Yes
Disable Smilies Within This BB Code: Yes
Disable Word Wrapping Within This BB Code: Yes
Disable Automatic Link Parsing Within This BB Code: Yes

When you add the new BB Code, it will probably give you an error - you can just ignore this.

Again, feedback is always welcone.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
puertoblack2003

Comments
  #2  
Old 08-02-2011, 11:35 PM
sulasno sulasno is offline
 
Join Date: Feb 2010
Posts: 588
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tagged and thanks
Reply With Quote
  #3  
Old 05-03-2016, 09:14 AM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting. Still working with the latest vb4 versions?
Reply With Quote
  #4  
Old 06-19-2016, 08:43 AM
tme_power tme_power is offline
 
Join Date: Sep 2006
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This BBcode depend on services at qrcode.kaywa.com
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:10 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03968 seconds
  • Memory Usage 2,250KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (1)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete