Ive got the software (abjs) working on a non pmwiki site (http://folk-lyrics.co.uk/Tunebook/HomePage) but not on the pmwiki version to be (currently at http://s593332318.websitehome.co.uk/Music/pmwiki/pmwiki.php?n=Tunebook.HomePage). When i get time, I was going to experiment with versions of abcjs and different configurations. I just wondsee ed if anyone was already successful in getting music out?
regards
Dave Cooke
On 12 December 2019 at 11:58 Hans-Jürgen Godau <[email protected]> wrote:

Sorry, I don't use the player. So, can anybody help David?
regards,
jürgen

Am Mi., 11. Dez. 2019 um 20:31 Uhr schrieb < [email protected]>:

Many thanks for your email. I seem to have it working except that since most browsers no longer have the music player plug-in, how do you get the tune to be played?

 

Regards

 

Dave Cooke

 

From: Hans-Jürgen Godau <[email protected]>
Sent: 19 July 2019 15:34
To: David Cooke <[email protected]>
Cc: PMWiki <[email protected]>
Subject: Re: [pmwiki-users] ABC tunebook

 

I use abctunebook. I made some mods to cope with php 7.2 and the latest pmwiki-release.

 

Here are my diffs:

 

--- abctunebook/cookbook/abctunebook.php 2016-01-08 15:39:00.000000000 +0100
+++ cookbook/abctunebook.php 2018-11-13 12:43:55.756779161 +0100
@@ -16,20 +16,23 @@
 
 $RecipeInfo['AbcTunebook']['Version'] = '2016-01-08';
 
-SDV($AbcTunebooks['default'], 'Tunebook');
+SDV($AbcTunebooks, array('default'=>'Tunebook', 0 => 'Liederbuch'));
+
+
 SDV($AddTunePage, 'NewTune');
 
 SDVA($Abcjs, array(
- 'dir' => $PubDirUrl.'/abcjs',
+ 'dir' => $FarmPubDirUrl.'/abcjs',
  'base' => 'abcjs_base-min.js',
  'editor' => 'abc_editor.js',
+ 'editor' => 'abc_editor.js',
  'plugin' => 'abc_plugin.js',
  'midi_program' => '1',
  'midi_qpm' => '160',
 ));
 
 # (:abcjs:) directive will load abcjs plugin scripts even if page is not in a tunebook group.
-Markup_e('abcjs', 'directives', '/\\(:abcjs:\\)/is', "AbcjsLoadPlugin(\$pagename)");
+Markup('abcjs', 'directives', '/\\(:abcjs:\\)/is', "AbcjsLoadPlugin");
 
 # otherwise abcjs will not be loaded and markup rules not be set
 $name = PageVar($pagename,'$Name');
@@ -37,17 +40,21 @@
 if (!in_array($group, $AbcTunebooks)) return;
 
 # load abcjs plugin
-if($action="" {
+if($action!='edit') {
  AbcjsLoadPlugin($pagename);
- Markup_e('X:abc', '>[=','/(?<!\\]\\]\n)(X:\\s*\\d+\\s*\n.*?)\n<:vspace>/s',"AbcTextMarkup(\$m[1])");
- Markup_e('#abc', '<X:abc',
-  '/\\[\\[#(abc\\d*)\\]\\](.*?)\\[\\[#\\1end\\]\\]/is', "AbcTextMarkup(\$m[2],\$m[1])");
+ Markup('X:abc', '>[=','/(?<!\\]\\]\n)(X:\\s*\\d+\\s*\n.*?)\n<:vspace>/s',"AbcTextMarkup");
+ Markup('#abc', '<X:abc',
+  '/\\[\\[#(abc\\d*)\\]\\](.*?)\\[\\[#\\1end\\]\\]/is', "AbcTextMarkup2");
+}
+
+function AbcTextMarkup2($m) {
+return AbcTextMarkup($m,$m[1]);
 }
 
 $FmtPV['$MidiTempo'] = '$GLOBALS[Abcjs]["midi_qpm"]';
 
-function AbcjsLoadPlugin($pagename) {
- global $Abcjs, $AbcTunebooks, $HTMLFooterFmt, $HTMLHeaderFmt, $HTMLStylesFmt;
+function AbcjsLoadPlugin($m) {
+ global $Abcjs, $AbcTunebooks, $HTMLFooterFmt, $HTMLHeaderFmt, $HTMLStylesFmt, $pagename;
  $speed = PageTextVar($pagename, 'speed');
  if (!$speed) $speed = 1;
  $rhythm = PageTextVar($pagename, 'R');
@@ -73,9 +80,9 @@
  ";
 }
 
-function AbcTextMarkup($text, $section=false) {
+function AbcTextMarkup($m, $section=false) {
  static $cnt=0; $cnt++;
- $text = trim($text);
+ $text = trim($m[2]);
  $out = '';
  if ($section) {
  $editlnk = "{[foxedit $section 'edit' form=Site.FoxAbcTemplates#editabc]}";

----------------------------------------------------------------------------------

It seems to work for me, at least partially. I have some difficulties with the inline-editor.

 

Hope this helps,

 

jürgen

 

 

Am Di., 16. Juli 2019 um 04:44 Uhr schrieb David Cooke <[email protected]>:

Is anyone using ABC tunebook and got it working. I used to use this a while ago, I came back last week to rebuild my folk song website only to find that it is now 'broken'. The last update was about 3 years ago with the previous major PHP update. Now when I try to install it,  I'm getting loads of error messages and no music script. 

 Regards

 

Dave Cooke

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


This email has been scanned by BullGuard antivirus protection.
For more info visit www.bullguard.com

 
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to