arsava / dokuwiki-template-vector

"vector" brings you the MediaWiki/Wikipedia 2010 look and feel for DokuWiki.
http://www.dokuwiki.org/template:vector
GNU General Public License v2.0
38 stars 9 forks source link

QR code button issue #75

Open rpschmitz opened 7 months ago

rpschmitz commented 7 months ago

Note: This issue was posted to the DokuWiki Forum,

I'm trying to add the "qrcodebtn" to my wiki using DokuWiki on a stick using the user section of the victor template. It shows and works along with other buttons I'm using, vector, dokuwiki, and a link to another website show and work but this one gives me the following warning:

2023-11-15 20:03:06 E_WARNING: Undefined array key "vector_qrcodebtn" D:\DokuWikiStick\dokuwiki\lib\tpl\vector\user\buttons.php(74)

0 D:\DokuWikiStick\dokuwiki\lib\tpl\vector\user\buttons.php(74): dokuwiki\ErrorHandler::errorHandler(2, 'Undefined array...', 'D:\DokuWikiStic...', 74)

1 D:\DokuWikiStick\dokuwiki\lib\tpl\vector\main.php(132): include('D:\DokuWikiStic...')

2 D:\DokuWikiStick\dokuwiki\inc\actions.php(27): include('D:\DokuWikiStic...')

3 D:\DokuWikiStick\dokuwiki\doku.php(126): act_dispatch()

4 {main}

Anyone know why this error message? Thanks.

Solved the problem by changing a couple of lines of code: //QR Code button //Note: do NOT remove this button. Please respect this. :-) $_vector_btns["qrcode"]["img"] = DOKU_TPL."user/button-qrcode.png";

// put this link in directly $_vector_btns["qrcode"]["href"] = "https://goqr.me/";

// disabled this line // $_vector_btns["qrcode"]["href"] = "http://".(($conf["lang"] !== "de") ? "goqr.me" : "qr-code-generator.de")."/";

$vector_btns["qrcode"]["width"] = 80; $vector_btns["qrcode"]["height"] = 15;

// disabled this line // $_vector_btns["qrcode"]["title"] = $lang["vector_qrcodebtn"];

$_vector_btns["qrcode"]["nofollow"] = false;