vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Basic QR Intergraton (2D Barcodes) for VB Threads (QR Pages by BOP5) VB4 (https://vborg.vbsupport.ru/showthread.php?t=272976)

BirdOPrey5 10-27-2011 10:00 PM

Basic QR Intergraton (2D Barcodes) for VB Threads (QR Pages by BOP5) VB4
 
1 Attachment(s)


Note: Updated to version 1.5- added QR codes for attachments and profiles as well as threads.

This isn't a polished mod, its purpose is to bring 2D Barcode (QR Code) integration to vBulletin. I will be marking it unsupported as I do not recommend users without some basic HTML or coding experience attempt to use the mod. I will NOT be answering basic setup questions. Instructions for the manual template edits are included in the zip. you may use them if you wish but I strongly suggest you work on a custom solution.

Live Demo: Qapla.com Thread

This mod will allow a uniqe QR Code to be generated and displayed for every thread on your forum.

Users with Android, iPhone, and other advanced phones can easily scan these QR Codes and share links with friends via email, text, and other social networking platforms.

The QR generation is handled by a free open-source project called phpqrcode which has its own GNU Lesser General Public License.

I have created the vBulletin interface needed to generate codes for individal threads, attachments, and/or profile pages.

The mod will check if the QR Code has already be generated for a thread (or profile, or attachment) and if so will simply display the png file previously created. If this is the first time someone has viewed the thread (since installing this mod) it will generate and save the QR Code for future use.

All QR Codes are stored in .png format in a new folder called /images/qr/ which you must create and must be writable. (chmd 755 is usually sufficient but if you have problems go to 777).

A utility included in the Admin CP settings will allow you to delete all these images if necessary.

Other Admin CP settings include the ability to set the size, quality, and border size around the QR Code.

What isn't finished is the best way to intergrate this onto your SHOWTHREAD pages and attachment template. I have instructions for a manual template edits that will give you a basic "box" that you can mouse-over and get the full image to pop-up over the rest of your page.

I am aware this isn't an ideal setup but I am more of a coder than a designer. If anyone has some suggestions (with code) for a better implementation I am open to suggestions.

This mod could be expanded to show QR Codes on all pages, not just threads, but until a better way is found to display the code on the page I didn't bother.

Server Load- In general the mod only generates a code on the first view of the thread- this will usually be when a new thread is first submitted so in the long run I don't anticipate any major server load by this mod. However if you have a very large and very busy forum you can expect a temporary increased load after installation as members visit hundreds of threads which have never had a QR Code generated before. This increased load should decrease after the surge of new generations end.

Disk Usage - The smaller the QR Code you generate the smaller the file size per image. In my experience the average size of each QR code png file was 600 bytes. This would mean about 586 KB per 1,000 threads or 58 Megabytes for 100,000 threads. You can extrapolate from there.

Please Mark as Installed if you use this. :)

BirdOPrey5 10-28-2011 08:24 PM

Reserved.

Taurus1 10-29-2011 12:27 AM

Thanks for this! Works great, and using your template edit looks great too. I just moved it to the right, O, and thanks for giving the option to change the background color too.

sulasno 10-29-2011 01:42 AM

tagged and thanks

ewebdesigner 10-29-2011 02:32 AM

I can't get the mod to show for some reason.

I uploaded everything and uploaded the XML file and activated everything in the ACP setting options but still doesn't show up. I also noticed that for every thread that I view that a new image is formed in my File manger under images/qr but the image still does not show for some reason.

Can you please tell me what I have done wrong and what I can do to fix this?

Thanks in advance, it is a great mod.

trophyrider 10-29-2011 02:53 AM

Quote:

Originally Posted by ewebdesigner (Post 2262533)
I can't get the mod to show for some reason.

I uploaded everything and uploaded the XML file and activated everything in the ACP setting options but still doesn't show up. I also noticed that for every thread that I view that a new image is formed in my File manger under images/qr but the image still does not show for some reason.

Can you please tell me what I have done wrong and what I can do to fix this?

Thanks in advance, it is a great mod.

Did you make the manual template edit in the showthread template? I haven't downloaded this yet, but I bet they are included in the mods zip file.

ProFifaLeagues 10-29-2011 05:12 AM

Works superb on 4.1.3 thank you

BirdOPrey5 10-29-2011 09:29 AM

Quote:

Originally Posted by ewebdesigner (Post 2262533)
I can't get the mod to show for some reason.

I uploaded everything and uploaded the XML file and activated everything in the ACP setting options but still doesn't show up. I also noticed that for every thread that I view that a new image is formed in my File manger under images/qr but the image still does not show for some reason.

Can you please tell me what I have done wrong and what I can do to fix this?

Thanks in advance, it is a great mod.

As was asked, you need to make the manual template edit to your SHOWTHREAD template.

The edit is in the .txt file in the zip.

To make a template edit go to Admin CP -> Style Manager -> (Select your Style) -> Choose "Edit Templates" from the drop down box, and find/open the SHOWTHREAD template.

--

Thanks everyone for the kind remarks. :up:

ewebdesigner 10-29-2011 12:03 PM

oh sorry I did not read all of the .txt file and forgot to do that. Worked great, thanks!

BirdOPrey5 10-29-2011 02:38 PM

Quote:

Originally Posted by ewebdesigner (Post 2262641)
oh sorry I did not read all of the .txt file and forgot to do that. Worked great, thanks!

Cool. Please "Mark as Installed" :)

puertoblack2003 10-31-2011 02:39 AM

Hello,

can you add a feature for attachment file download using this mod. ?

thanks

BirdOPrey5 10-31-2011 11:07 AM

Just to clarify- next to each attachment you want a QR code with the URL of the download? It's something I can look into.

puertoblack2003 10-31-2011 03:40 PM

1 Attachment(s)
Quote:

Originally Posted by BirdOPrey5 (Post 2263135)
Just to clarify- next to each attachment you want a QR code with the URL of the download? It's something I can look into.


yes, a better look here > qrcode attachment sample



Attachment 134171

Attachment 134172

nhawk 10-31-2011 09:10 PM

1 Attachment(s)
Nice Add-on! :)

If you aren't using the first post ad location, that's a great place to put this..

Edit the QR Code plugin and put this code at the end BEFORE the }..

Code:

$template_hook['share_this_thread'] = $threadinfo['qr'];
Also, change the hook from showthread_complete to showthread_postbit_create

Then in ACP->Advertising, click Add New Ad, select 'Thread' and click on First Post Content.

Title: Share This Thread

Ad HTML:
Code:

<div align="center">Share This Thread<br />
{vb:raw template_hook.share_this_thread}</div>

Active: Yes

Click Save and you're all set.

You may need to edit ad_margin, ad_padding and ad_maxWidth in stylevars for it to display properly.

Sunka 11-01-2011 01:05 AM

Good temwork BirdOPrey5 & nhawk

Installed!

Videx 11-04-2011 08:43 PM

Quote:

Users with Android, iPhone, and other advanced phones can easily scan these QR Codes and share links with friends via email, text, and other social networking platforms.
When I'm reading the forum on my Android smartphone, how do I scan a QR code? And is this easier than clicking a link?

BirdOPrey5 11-04-2011 11:02 PM

You don't use this if you are reading the forum on your smartphone... This is for when you are browsing the forum on a real computer or laptop, you can then scan the image with your smartphone and quickly get the link on your phone to share or use how you want.

OldSchoolDSL 11-19-2011 01:47 AM

1 Attachment(s)
Quote:

Originally Posted by nhawk (Post 2263270)
Nice Add-on! :)

If you aren't using the first post ad location, that's a great place to put this..

Edit the QR Code plugin and put this code at the end BEFORE the }..

Code:

$template_hook['share_this_thread'] = $threadinfo['qr'];
Also, change the hook from showthread_complete to showthread_postbit_create

Then in ACP->Advertising, click Add New Ad, select 'Thread' and click on First Post Content.

Title: Share This Thread

Ad HTML:
Code:

<div align="center">Share This Thread<br />
{vb:raw template_hook.share_this_thread}</div>

Active: Yes

Click Save and you're all set.

You may need to edit ad_margin, ad_padding and ad_maxWidth in stylevars for it to display properly.

For those of you who dislike editing templates or files, but want to use the above alternative

This file will do it for you and you will not need to edit anything. ;)

Alan_SP 12-10-2011 03:33 PM

Excellent mod, but I have problems with deleting images. For some reason it doesn't delete images.

Alan_SP 12-11-2011 09:45 AM

About positioning of QR code, I use this:

HTML Code:

<vb:if condition="$post['isfirstshown']">       
<div align="right"><b>Share thread with your friends:</b><br />
{vb:raw thread.qr}
</div>
</vb:if>

Condition is that QR code is shown only in first posts, you can place this code wherever you like it in your postbit (legacy) template. I placed it after signature (but outside of signature conditionals so it's shown even if user don't uses signature).

To use it you need to change plugin hook location as nhawk suggested, from showthread_complete to showthread_postbit_create. But, new template hook that nhawk suggested ({vb:raw template_hook.share_this_thread}) doesn't work, so you don't need to add it at the end of plugin code:

PHP Code:

$template_hook['share_this_thread'] = $threadinfo['qr']; 

It works without it, just use {vb:raw thread.qr} instead.

Important note: If you use it in ad templates, then you need to create this template hook and use it as nhawk suggested. This information is only if you want to manually place QR code somewhere in your postbit (legacy) templates.

BirdOPrey5 12-11-2011 02:11 PM

Quote:

Originally Posted by Alan_SP (Post 2276525)
Excellent mod, but I have problems with deleting images. For some reason it doesn't delete images.

Any error message?

Alan_SP 12-14-2011 02:11 PM

No, I don't see any error messages, it looks like it just hangs there, white screen (with text "Delete QR Images"), nothing happens, no images are deleted. I can manually delete them, but this is just workaround.

Jman423 12-19-2011 02:10 AM

I'm trying to figure out what the change in order to get these to show up in the VBCMS pages. We have a lot of automotive how-to articles that, with the help of this, people would be able to quickly load it up on their phone or tablet to view it on the go.

Is it as simple as copying the plugin and changing some code, or is it a whole lot more complicated?

Any tips would be greatly appreciated.

I did get it working properly in threads. I was having trouble with the photos getting deleted too, even set to 777, so I just deleted them via FTP. No error message here either, just a blank screen.

BirdOPrey5 12-19-2011 11:48 AM

I think for CMS articles it will be a little more complicated then threads or attachments. Threads and attachments have a numeric ID so it was easy to change just a couple lines and get it working on a new hook.

CMS articles don't have IDs (best I can tell) but there must be some way of getting the URL. I don't think it is impossible but I don't have any ideas on how at the moment.

Alan_SP 01-03-2012 01:37 PM

Could you make this to work with users profiles? Users profiles have numeric ID, so it could be made that every user has QR code for his profile. And that could be very useful for certain types of communities, enabling users to use this QR code in their business cards or something similar as their internet location. And of course, in this way our forums get advertised also. :)

And as locations for putting QR code in profile, either in About me tab somewhere at the end, or completely new tab in profile.

Anyway, I thing that this would be very useful to more than one type of community.

BirdOPrey5 01-03-2012 02:05 PM

Profiles seem like a good idea Alan, will try.

OldSchoolDSL 01-04-2012 07:29 PM

Quote:

Originally Posted by OldSchoolDSL (Post 2269414)
For those of you who dislike editing templates or files, but want to use the above alternative

This file will do it for you and you will not need to edit anything. ;)

I'm a little puzzled as to why this seems not to be working in 4.1.10 Alpha 2

I know there were a lot of style templates that were renamed, moved, or deleted in this version. And I'm honestly losing track of which one is which any more.

Any idea on this?

Papa Bear 01-04-2012 07:54 PM

Quote:

Originally Posted by OldSchoolDSL (Post 2283872)
I'm a little puzzled as to why this seems not to be working in 4.1.10 Alpha 2

I know there were a lot of style templates that were renamed, moved, or deleted in this version. And I'm honestly losing track of which one is which any more.

Any idea on this?

works for me.you can go to my site and see it..4.1.10 alpha 2 .I used the xml you provided Then manually went in and added the info into the ACP->Advertising section..

OldSchoolDSL 01-04-2012 09:05 PM

Quote:

Originally Posted by Papa Bear (Post 2283879)
works for me.you can go to my site and see it..4.1.10 alpha 2 .I used the xml you provided Then manually went in and added the info into the ACP->Advertising section..

Resolved.

It was all there, but I found re-installing this modification and re-confirming the advertising, fixed the issue. No idea why. But it worked.

Seductor 01-05-2012 02:01 PM

Hi @BirdOPrey5. Do people really use QR codes? I mean, I have asked my friends and they know it, but they don't use it very often.

BirdOPrey5 01-05-2012 03:32 PM

Seductor,

Good question... I don't, but I don't watch American Idol or listen to Lady Gaga either, so I really am a bad person to ask what most people do... it would seem from the responses I've gotten some people find QR codes very important.

Boofo 01-05-2012 04:47 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2276747)
Any error message?

Here is the error message I just received when I clicked on "Delete All Images":
Quote:

Fatal error: Cannot redeclare print_cp_login() (previously declared in /home/xxxxx/public_html/forums/includes/adminfunctions.php:26) in /home/xxxxx/public_html/forums/includes/adminfunctions.php on line 246
Here is what I did to fix it. In the file "bop5qrcode.php", I changed this:

Code:

        //if ($vbulletin->userinfo['usergroupid'] == 6)
        {
                    //If User is an admin, delete the files
        require(DIR . '/includes/adminfunctions.php');


To this:

Code:

        //if ($vbulletin->userinfo['usergroupid'] == 6)
        {
                    //If User is an admin, delete the files
        //require(DIR . '/includes/adminfunctions.php');


You already had adminfunctions.php declared above in "REQUIRE BACK-END" with require_once.

Excellent mod, Joe. You are to be commended. ;)

Alan_SP 01-05-2012 05:48 PM

Just to report it, Boofo found bug and solved it. Now everything works and QR images are deleted.

Thank you. :up:

Alan_SP 01-05-2012 05:50 PM

Quote:

Originally Posted by Seductor (Post 2284113)
Do people really use QR codes? I mean, I have asked my friends and they know it, but they don't use it very often.

Yes, I don't use it, I only heard for it, remember I saw it here and there, but not too often. On the other hand, people will use it more and more and they are good bridge between classical print and "new print" i.e. Internet.

I see this more as investment in future and a way to advertise my forum...

Boofo 01-05-2012 06:03 PM

I agree. The QR codes are becoming more popular for cell phones now. I used my first one just a few weeks back and it worked pretty slick. It was for a local grocery store that has an Android app available and it made it real easy to just scan the code and the app pops up from the App store in a flash. Searching will almost become obsolete in time. ;)

BirdOPrey5 01-05-2012 07:37 PM

Awesome, thanks Boofo... I will include in the next update.

The next update will include options for attachments and profile pages. Hopefully this weekend.

Boofo 01-05-2012 08:08 PM

Instead of using require, use require_once as you won't run into problems like this then. And, you're welcome, sir. ;)

BirdOPrey5 01-08-2012 04:42 PM

Updated to version 1.5.

You don't need to re-upload the phpqrcode directory but you should re-upload and overwrite the rest.

puertoblack2003 01-08-2012 05:59 PM

good job BirdOPrey5 on the attachment qrcode, :up: one last thing how can i make it so it'll be a mouse over effect?

thanks

Alan_SP 01-08-2012 08:47 PM

QR code in profiles works excellent. :up:

I used your suggestion for placement and also added it in MEMBERINFO template.

Find:

HTML Code:

<vb:if condition="$show['viewblog']">
                                                        <li><a href="{vb:raw $vboptions.vbblog_url}{vb:if "$vboptions['vbblog_url']", '/', ''}blog.php?{vb:raw session.sessionurl}u={vb:raw userinfo.userid}" rel='nofollow'><img src="{vb:stylevar imgdir_siteicons}/blog.png" class="inlineimg" alt="" /> {vb:rawphrase view_blog_entries}</a></li>
                                                </vb:if>

Below that add:

HTML Code:

<vb:if condition="$vboptions[bop5qr_en] AND $vboptions[bop5qr_enprofiles]"> 
    <br />
                        <li>{vb:raw userinfo.qr}</li>
    </vb:if>

It makes QR code visible on every profile page. :)


All times are GMT. The time now is 03:12 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01389 seconds
  • Memory Usage 1,852KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (3)bbcode_html_printable
  • (1)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete