31
Mamba
Re: QR Code Generator
  • 2013/2/7 11:55

  • Mamba

  • Moderator

  • Posts: 11254

  • Since: 2004/4/23


Quote:
unfortunately the download link is dead

Hmm? It works perfectly here.

But since the solution from Trabis seems to work for you, you might not need it anymore...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

32
chefry
Re: QR Code Generator
  • 2013/2/7 12:26

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


I kept getting a network timeout

33
Peekay
Re: QR Code Generator
  • 2013/2/7 14:21

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I got this to work with News too, but I have un-installed the module now. It turns out that all the codes are sourced from designburo.nl, not generated by the module code.

Users should be aware of this if they are unhappy with dependency on external sites for module functionality.

34
chefry
Re: QR Code Generator
  • 2013/2/7 14:26

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


yeah, i noticed that too. I hope nothing happens to designburo.nl

that's why I wanted to look at the alternative Mamba proposed, but I can't get it to download

35
Peekay
Re: QR Code Generator
  • 2013/2/7 14:41

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


This module appears to have a QR library which is stored in Xoops Trust Path. There's a function call which looks like it may be customisable with variables:

modules/qr/getqrcode.php?qrdata=DATA_TO_ENCODE

I'll have a play with it over the weekend.

The other module worked, but I don't like function calls and back-links connected to 3rd party sites, so it's not for me.

36
Mamba
Re: QR Code Generator
  • 2013/2/7 14:55

  • Mamba

  • Moderator

  • Posts: 11254

  • Since: 2004/4/23


OK, you can download the QR module from here
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

37
chefry
Re: QR Code Generator
  • 2013/2/7 15:12

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


thanks mamba, i'll try it out this weekend and report back

38
Peekay
Re: QR Code Generator
  • 2013/2/7 21:12

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Just installed the Geekwright module on Xoops 2.3 (cannot do 2.5 at present due to localhost setup) and it works very well. It comes with 3 BLOCKS - a 'Manual QR code' block (you enter some static text) a 'This page' block (a URL link to the current page) and a 'Me-Card' which allows you to put your contact details into a QR code, although this may not be in a Vcard compatible format.

Although you can set the 'This page' block to appear on 'All Pages', to get it to work for all modules you need to load a page from each module and check the query-string in the address bar. For example, the query string in the 'Content' module is at the end of the item address:

Quote:

To display a QR code linking to each item in a block on every Content module page, you would need to add id to the default list provided with the module in blocks admin.

You will need a small script to pull the variables together to generate a mixed text/URL QR code like Chefry wants, but looks promising. Plus, the QR codes are constructed on your server, not someone else's.

39
chefry
Re: QR Code Generator
  • 2013/2/7 21:17

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


Yeah, I tried it to. It works the same as qr code and only gives the URL

I'll stick to the code Trabis gave us, it works perfect

40
Peekay
Re: QR Code Generator
  • 2013/2/9 14:16

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


It seems easy enough to pull variables from a module and feed them to a QR code using the Geekwright module. Slightly different method, but much faster because the QR code is generated on your server, not somebody else's.

As said previously, I can't test Xoops 2.5 or Publisher at present, but the code below worked fine for me using an old version of the 'Content' module (index.php). You obviously need to locate the PHP file + template file combination for the module you want to use and customise the script to suit, or I suppose you could create a module-specific block. Don't send the script any variables that don't actually exist, or it will choke.

// Peekays QR Code Hack **************

$data $xoopsTpl->get_template_vars('xoops_sitename'); // Add the site name

$data .= ' - '//Add a separator

$data .= $xoopsTpl->get_template_vars('xoops_pagetitle'); // Add the page title or module name

$data .= "%0A"// Add a line break.

$query_string $_SERVER['QUERY_STRING'] ? '?' $_SERVER['QUERY_STRING'] : '';
$url 'http://' $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . $query_string;
$oururl urlencode($url); // Add the link. N.B. this needs to be urlencoded.

$data .= $oururl;

$myqrcode '<img src="'.XOOPS_URL.'/modules/qr/getqrcode.php?qrdata='.$data.'" />';

$xoopsTpl->assign('myqrcode'$myqrcode);


// end QR Code hack ****************


I'm sure someone could tidy that up and make it more 'elegant'

Login

Who's Online

57 user(s) are online (29 user(s) are browsing Support Forums)


Members: 0


Guests: 57


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits