01487: Custom GUI edit buttons duplicating
Description: Apologies in advance if this is not the correct medium to make this topic.
I am copying a custom gui edit button cookbook that was used on pmwiki-2.2.0 with PHP5. When I try to use it on a pmwiki-2.3.16 with PHP7, the gui edit buttons appear but it is duplicating.
I am not really knowledgeable on PHP scripts and did my research to fix it but my attempts all fails..I would really appreciate if someone can hint me on where the possible problem is, then I will make my research and try to fix it.
There is really no problem, no need to apologize, this is the correct place to ask.
Here is your file updated for recent PmWiki and PHP versions: Attach:ykaly-buttons.php.
If you don't have it in config.php, add this line:
(I suspect you already have it).
$EnableGUIButtons = 1;
The buttons appeared twice because your cookbook script included the core guiedit.js, and PmWiki also included it, so it got loaded twice.
I have updated your recipe to work with PHP up to 8.2 (removed older insert functions), and with the latest PmWiki (some escaped characters needed to be updated).
Let me know if you find some bug/omission, or if you need additional assistance. --Petko