21
chefry
Re: QR Code Generator
  • 2013/2/6 14:35

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


ok, I tried the change in item.php and instead of a qr code, I get"error no text"

22
Peekay
Re: QR Code Generator
  • 2013/2/6 17:23

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


OK. I'll try and take a closer look at it tonight, unless Trabis can tweak his code first. This will work...

23
chefry
Re: QR Code Generator
  • 2013/2/6 17:36

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


I was looking at the code and the qrcode and i'm not sure it can be done :(

qr code module calls for 1 'type'

to insert the title as a link you have to call 2 'type'

24
Peekay
Re: QR Code Generator
  • 2013/2/6 18:39

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


It will work, but you cannot create a text link. As far as I know, phone QR code scanners cannot read HTML code in the QR, except links. The output would look like this (link would be push-clickable)

Quote:

You should be able to put other stuff in the text part, e.g. site name etc.

25
chefry
Re: QR Code Generator
  • 2013/2/6 18:43

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


the example you give is what i want, ideally with the site name

Quote:

26
trabis
Re: QR Code Generator
  • 2013/2/6 20:31

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


I took a look at the qrcode file. Try this
Quote:

if (file_exists($file = XOOPS_ROOT_PATH . "/modules/qrcode/qrcode.php")) {
include_once $file;
$txt = $xoopsTpl->get_template_vars('xoops_pagetitle'); //Add the page title
$txt .= " - "; //Add separator
$txt .= $xoopsTpl->get_template_vars('xoops_sitename'); //Add the sitename
$txt .= "\r\n"; //Add a line break
$txt .= $itemObj->getItemUrl(); //Add item url
$item['qrcode'] = qrcode('txt', array('txt' => $txt), '250'); //Get the qrcode image
}


Not tested.

27
chefry
Re: QR Code Generator
  • 2013/2/6 21:52

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


what file do I put this in, and where?

28
Mamba
Re: QR Code Generator
  • 2013/2/7 8:36

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


You can also try this QR module.

It has three blocks, and one of them provides a QRcode link to the current page, so it should do what you were looking for.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

29
chefry
Re: QR Code Generator
  • 2013/2/7 11:04

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


unfortunately the download link is dead

30
chefry
Re: QR Code Generator
  • 2013/2/7 11:31

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


Trabis, I put that code in the item.php file, replacing what you gave me before


Trabis, you are AWESOME!!! Works perfectly

Login

Who's Online

202 user(s) are online (125 user(s) are browsing Support Forums)


Members: 0


Guests: 202


more...

Donat-O-Meter

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

Latest GitHub Commits