19
Quote:
chefry wrote:
I was hoping Trabis would read the thread,
How about it Trabis, can you give us a quick fix?
I don't have time to implement this on publisher. I may do it for the 2.6.0 version and using the qrcode module that is in the core.
For a quick fix let us try following Peekay example.
Edit item.php and search for:
$xoopsTpl->assign('item', $item);
It should be on the bottom of the file.
Before that line try to add this code:
//start of hack
if (file_exists($file = XOOPS_ROOT_PATH . "/modules/qrcode/qrcode.php")) {
include_once $file;
$data = array(
'title' => $itemObj->getVar('title'),
'url' => $itemObj->getItemUrl(),
);
$size = "250"; // image will be 250x250px
$item['qrcode'] = qrcode('url', $data, $size);
}
//end of hack
$xoopsTpl->assign('item', $item);
I never used qrcode so I don't know what data it accepts. I've added the 'title' but I have no idea if it will be read/added or not.
Now in the publisher_item.html template you should be able to use this line for displaying the qrcode:
<{$item.qrcode}>
Not tested.