Jump to content

Macrura

PW-Moderators
  • Posts

    2,756
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. @protro (1) the way the tag field would work is if you had a page somewhere holding a whole bunch of audio files, and you had a page reference field on that page named "media_tags", and you added a "tag" (page reference) to that field, say using like ASM select, and the tag was called "Sunday", then you would use the playlist tag, like [smplaylist tag=Sunday], in a textarea or text field, then it is supposed to output that whole playlist. (2) To get the players to output in your scenario, all you would need to do is echo $page->tag_audio. Because you need to echo the field holding the shortcode, so that will initiate the processShortCode() method. You don't need to use the shortcode though - especially in how you have it setup. The shortcode is really for putting players inside other content, like long articles where the players are between paragraphs. For your application you can just init the module and then do this: echo $sm2->player($page->audio, $options); It should work if your audio field is a single or multiple files field. I would use TracyDebugger to check to see what $sm2 is at the point of where you are echoing it.
  2. yeah looks very cool @gornycreative Perhaps if you don't mind sharing it, it would be great to have a look! - this is somewhat the original intention of the module, to be able to provide all of those types of settings interfaces like people build for WordPress etc..
  3. @gornycreative thanks - the use case sounds interesting and obviously useful for dynamically generating options from other places than static choices; I'll play around with it soon and try and post back, have some projects that will probably need more elaborate settings pages soon...
  4. @gornycreative can you post a link to some info about the $wire->file methods? - i couldn't find it in the docs and haven't had time to go look at the core source code. -marc
  5. This looks great – I'm still using an old copy of Kedisoft Totals for all my invoicing, but it's getting long in the tooth, many things don't work right. Looking forward to trying this out!
  6. Thanks - i will check and see if this can be fixed, or I'll add info to the instructions about hidden pages.
  7. Hi @fruid - sorry to hear about this! Could you send me the PHP file to have a look at it? Also let me know your PW, PHP and MySQL versions and i'll take a look. You never know, something could have changed with the PW version or PHP 8, and we need to make sure this module keeps working! - Marc
  8. @taotoo thanks for this - and i actually can't recall how that got fixed but i did sync the repo and the fix was probably in there.. I will definitely get around to do a deep dive check and make sure it works and add the AdminThemeCanvas to the code as you have indicated; I didn't even know about that new theme...
  9. I have no idea if it will work – module config fields can't use a database table, they have to be able to store in JSON, so it would take some research and experimentation to see if it is even possible to use this field type in a module config. So setting schemaClass would have no effect. Most module configs that use repeatable interfaces are done with custom javascript, as far as I have seen. (For example use a text field for the first one, and then a hidden field to store the repeatable values; use JS to allow the users to add an inputfield, and then join all of the values together in pipe delimited hidden field..)
  10. when you do the code to add it, you would need to specify the Fieldtype to multiply, so that needs to be one of the options, 'fieldtypeClass': 'FieldtypeText' in the json or wherever... (haven't tested this, but looking at the module, it does need the "fieldtype to multiply" to be expressly set)
  11. @Clarity - Settings Factory should technically support what any module config would; i've never seen repeater fields used in a module config screen, probably because repeaters require the use of hidden pages. So for now this module would need to stay limited to those fields whose values can be stored in text/json;
  12. awesome! Thanks for using the module - hope it helps and is useful!
  13. @Clarity Can you post the contents of your PHP file? Are you using any namespace? What version of ProcessWire are you on? There is an example settings file in the module, you can copy to your templates folder somewhere and then specify that file for the settings. If that file doesn't work, then something must have changed in the core. It works for me under PW 3.0.178.
  14. @Atlasfreeman the player is working when i visit that page, so i don't know why the play button is pausing after you hit it, because that's not happening to me, i can play all of the tracks. What browser are you using? I'm on firefox and the players work well..
  15. (1) if you are using the textformatter, then you do not need to module init in _init.php (2) There is no CSS being output on your page, so the players will not look right (3) If everything is automatic, then it should just work, and you shouldn't have to do any code in the header or footer. If you want to use the $config option, then you need to put the foreach for the $config->styles and $config-scripts in the header and footer respectively. (4) What does your shortcode look like in the CK editor? (5) If you are using Tracy Debugger then you can check the contents of the variables to see what is going on and trace the issue. You may also want to look into using Plyr instead of soundmanager; Here's an example of how I'm using it instead of SM2, within a CK editor field: https://www.equinoxmusic.com/technology/ https://plyr.io/
  16. @Atlasfreeman yes technically if it is in the _init, then it should work, unless that variable is out of scope for any reason on this particular file. all of the code you showed should all work, so you just need to figure out why those are not working; Did you try the auto option for the assets? How are you getting the JS files to output? if the audio is inside a CK editor field then you need to make sure the textformatter is applied to that field in the field settings. If you are outputting manually then i think you need to pass the options to the $sm2 instance like is shown in a lot of the posts above with the examples for how to output audio player using the API, as opposed to audio players that live inside a CK editor field and are being parsed like shortcodes, with the textformatter.
  17. @Atlasfreeman Set the output method as manual, then get the module object like this: $sm2 = $modules->get('TextformatterSoundmanager'); then your foreach should work
  18. @Atlasfreeman >called "textformatterSoundmanager-master" can this be the problem? yes, rename it "TextformatterSoundmanager" Also you have to output the CSS files - you can choose your output option in the module, but it won't look right without the CSS. So you can output the $config->styles, or use one of the options.. Let me know how it goes..
  19. @taotoo i have experienced that and i thought i had fixed it. I will check to see if there is some change or update i forgot to commit to the repo and get back to you - it is definitely solvable if i recall.
  20. Yes - will do asap - should be working on that site again today or tomorrow... Thanks!!!
  21. I think the issue here is that Tracy is running 2x, and thus the JS error; For me this usually happens if i am doing an ajax call to an endpoint and that endpoint is still allowing Tracy to run; I couldn't stop tracy with an exit() like i was able to do in the past for some reason, so i had to disable the template in the module settings.
  22. Thanks - yeah I'm thinking about what is best to use - this is a paywall type of situation, and I like that aMember pro has been around for a long time, and is a 1-time payment not an ongoing subscription... I think i will need to use PW users because this client wants a lot of stuff to change for subscribers, like no google ads, etc..
  23. Awesome write up and thanks so much for this post and the details – very inspiring. I also recently started using HTMX for a lot of things on PW sites, and am similarly impressed and loving it. <off-topic> have a site that I need to develop a subscription/membership system for. I'm looking at amember, memberful, and a special setup using Foxycart. All have their pros and cons, but I see that this site uses amember. I wonder if you have any insights about working with amember... </off-topic>
  24. Wow - super nice, and will be installing this on all of my sites! Thank You!
×
×
  • Create New...