Leaderboard
Popular Content
Showing content with the highest reputation on 01/29/2017 in all areas
-
Soundmanager2 Audio for Processwire Github: https://github.com/outflux3/TextformatterSoundmanager Modules Directory: http://modules.processwire.com/modules/textformatter-soundmanager/ This module provides most of the free audio player interfaces for Soundmanager2 by Scott Schiller: Bar UI 360 UI 360+ spectrum UI mp3 buttons mp3 links Page Player, muxtape-style UI Cassette Player The module is a Textformatter that works by allowing you to insert shortcodes which are parsed into audio players. The players may be placed anywhere in the content (ck editor or other text field) using the shortcode, for example: [smplayer tag=audio1] The output will be a default single player (as specificed in the module settings), or if multiple audio files have the same tag, and you don't specify a type (UI), it will default to the Bar UI for the playlist. You may also specify page-player for the type as it also supports playlists. Here is a more complex tag: [smplayer tag=audio1 type=bar-ui color=2288CC] the tags available on shortcodes are: tag - *required to find the audio file on the page type (the type of player) limit (limit the number of files to load when using a playlist) Player specific tags for Bar UI: bar-ui (options for the bar-ui player) skin (applies to a bar-ui skin to load) extra (when set to true, it will display the extra controls) color (hex value for color - applies to bar-ui and mp3 buttons) compact (makes the player very narrow) playlist-open (make the playlist drawer open instead of needing to click the playlist button to open it.) dark-text (instead of white) flat (remove the faux 3d effect) When using the shortcode, you can chain the tags using underscore, for exmaple: [smplayer type=bar-ui bar-ui=flat_playlist-open_dark_text] Player specific tags for Cassette: cassette (options for the cassette player) In case you are not familiar with SM2, it powers a lot of major audio on the web, like Soundcloud, LastFM, AllMusic etc). The players are all rock solid and work on a wide range of browsers and devices. Features Multiple Audio Formats SM2 supports many formats, and those can be enabled/disabled in the module config if you want to prevent any from being loaded. So far this module was tested with MP3 and AAC (.m4a). GetID3 Support When enabled, ID3 tags from every audio file that pass through the Textformatter are read and cached as arrays using WireCache. Therefore the first load of a page with new audio files may be slow while the tags are read and stored. The tags are indexed by the filename of the audio, so as long as you don't upload multiple files with the same filename, or change the tags, the system will store the metadata permanently. To remove any metadata, you would need to use Soma's Cache Admin module, or clear it from the database. Schema Support When enabled, some schema tags relating to audio files will be added to the markup. CK editor Plugin Very basic dropdown that inserts some pre-configured player codes into the editor. Copy the plugin into your CK editor plugins folder, enable and add a button for 'soundmanager'. Instructions Before you install: 1) You will need a files field that accepts audio files, so set the extensions you want to use, such as mp3, m4a, mp4, wav etc. 2) Also make sure that you enable tags on the files field because the module references the tags for any audio file in the shortcode. 3) Add the files field to your template. Installation and Setup 1) Install the module and adjust your settings from the module configuration screen. 2) Add the TextformatterSoundmanager textformatter to the field where you want to insert audio (e.g. 'body'). 3) Optionally install the CK editor plugin to enable quick access to preconfigured shortcodes. 4) Add a shortcode into the textarea field that has the textformatter applied to. 5) You must reference the tag you entered in the audio file's tag field in the shortcode, and that will create a player for that audio file. 5a) To create a playlist, put the same tag in multiple audio files. Output 1) In order for the module to output the necessary styles and scripts, you need to echo the $config->styles and $config->scripts arrays into your site's header/footer. Here is an example: // In Header foreach($config->styles as $style) echo "<link rel='stylesheet' type='text/css' href='{$style}' />\n"; // In Footer foreach($config->scripts as $script) echo "<script type='text/javascript' src='{$script}'></script>\n"; API Usage To access the module's player method directly, you would first init the module in your _init.php file: $sm2 = $modules->get('TextformatterSoundmanager'); then anywhere in your templates, you can output any audio file with any player, in an configuration like this: $options = [ 'type' => 'bar-ui', 'skin' => 'gradient-fat', //'tag' => 'audio1', // tag is not needed when using the API //'bar-ui' => 'playlist-open' //all of the classes to apply to the bar ui. ]; foreach($page->audio as $track) { $content .= $sm2->player($track, $options); } Advanced Features Using other pages for storing music as playlists. You can create a field to hold a tag for a **page* and then refer to that tag in your shortcode. The shortcode word would be smplaylist instead of smplayer. The module will search the site for pages with that tag in that field. Then it will output all of the audio files in that page's audio field using the player and settings you specify. See the module configuration to select the tag field and adjust your shortcode words. Caveats Some player will not work well on the same page as other players. Bar UI and Page Player 360 Player and 360 Visual (large) players Also note that the cassette player can only occur once on a page. You can have multiple cassettes output, but they will all play the same audio file. The file that the cassette player uses is set in the script tag. In the future the setup may be modified to allow for cassette players to have their own audio files. About Soundmanager2 http://www.schillmania.com/projects/soundmanager2/ Speak and be heard More sound, in more places Despite being one of the senses, sound has largely been missing from the web due to inconsistent technology support. SoundManager 2 bridges this gap, making it easier to use audio across a growing variety of devices and platforms, both desktop and mobile. HTML5 + flash hybrid Complexity, reduced Supporting HTML5 audio can be tedious in modern browsers, let alone legacy ones. With real-world visitors using browsers ranging from mobile Safari to IE 6 across a wide range of devices, there can be many support cases to consider. SoundManager 2 gives you a single, powerful API that supports both new and old, using HTML5 audio where supported and optional Flash-based fallback where needed. Ideally when using SoundManager 2, audio "just works." The ginsu knife: 12 KB Big features, small footprint Performance is an important metric, too. SoundManager 2 packs a comprehensive, feature-rich API into as little as 12 KB over the wire when optimized; that's less than 8% of the original, uncompressed file size. SM2 is self-contained, having no external dependencies, and is compatible with popular JavaScript frameworks. The source code is BSD-licensed and is provided in fully-commented, non-debug and compiler-optimized "minified" versions appropriate for development and production use.8 points
-
NOTE: This thread originally started in the Pub section of the forum. Since we moved it into the Plugin/Modules section I edited this post to meet the guidelines but also left the original content so that the replies can make sense. ProcessGraphQL ProcessGraphQL seamlessly integrates to your ProcessWire web app and allows you to serve the GraphQL api of your existing content. You don't need to apply changes to your content or it's structure. Just choose what you want to serve via GraphQL and your API is ready. Warning: The module supports PHP version >= 5.5 and ProcessWire version >= 3. Links: Zip Download Github Repo ScreenCast PW modules Page Please refer to the Readme to learn more about how to use the module. Original post starts here... Hi Everyone! I became very interested in this GraphQL thing lately and decided to learn a bit about it. And what is the better way of learning a new thing than making a ProcessWire module out of it! For those who are wondering what GraphQL is, in short, it is an alternative to REST. I couldn't find the thread but I remember that Ryan was not very happy with the REST and did not see much value in it. He offered his own AJAX API instead, but it doesn't seem to be supported much by him, and was never published to official modules directory. While ProcessWire's API is already amazing and allows you to quickly serve your content in any format with less than ten lines of code, I think it might be convenient to install a module and have JSON access to all of your content instantly. Especially this could be useful for developers that use ProcessWire as a framework instead of CMS. GraphQL is much more flexible than REST. In fact you can build queries in GraphQL with the same patterns you do with ProcessWire API. Ok, Ok. Enough talk. Here is what the module does after just installing it into skyscrapers profile. It supports filtering via ProcessWire selectors and complex fields like FieldtypeImage or FieldtypePage. See more demo here The module is ready to be used, but there are lots of things could be added to it. Like supporting any type of fields via third party modules, authentication, permissions on field level, optimization and so on. I would love to continue to develop it further if I would only know that there is an interest in it. It would be great to hear some feedback from you. I did not open a thread in modules section of the forum because I wanted to be sure there is interest in it first. You can install and learn about it more from it's repository. It should work with PHP >=5.5 and ProcessWire 3.x.x. The support for 2.x.x version is not planned yet. Please open an issue if you find bugs or you want some features added in issue tracker. Or you can share your experience with the module here in this thread.5 points
-
4 points
-
This is going to be amazing! - here is a wishlist.., not sure if these can be gradually implemented.. - backup from scheduled cron job - exclude by file extension, for example exclude all .mp3, or .jpg etc; /alternately if the above is not possible, then the existing functionality of excluding directory would be ok (like exclude the site/assets/files in case that folder is multiple GB; we often just sync that folder with an S3 directory to keep a backup)... - protect access to the module screen by role/user4 points
-
3 points
-
I am not a big ML user, but I ended up with a Table field on the home page for sitewide translations. I use a 'name' field for the first column and a textAreaMultilanguage for the second column. This makes it really easy to add new strings and edit via the admin. I wrap the Table field in a fieldsetTab called "Sitewide Translations" to keep it separate from the main content.3 points
-
Or if it's a remote URL you might need something like this instead of file_exists. $file_headers = @get_headers($filename); if($file_headers[0] == 'HTTP/1.0 404 Not Found') {2 points
-
You can do this: $failed_files = array(); foreach($items as $item) { if(file_exists($fileurl)) { $item->scheda_tecnica = $fileurl; $item->save(); } else { $failed_files[] = $fileurl; } } // when finished, echo/log the contents of $failed_files2 points
-
Last update: June 2024 Current stable version: 1.5.4 Dev version: github dev-branch You can find the module on Github and in the modules directory : https://modules.processwire.com/modules/duplicator/ https://github.com/flydev-fr/Duplicator/archive/master.zip Screenshots / Features Dir and files exclusion CRON job Advanced settings Local and Cloud storage duplicator.mp41 point
-
Thank you very much for this module, @Nurguly Ashyrov! I missed this graphql thing completely, though was messing around json api a bit. Had some great time reading about it. Seems like ProcessWire fits graphql like a glove. Your module should answer a lot of recent questions about integrating PW with vue.js and alike. Dries Buytaert, the Drupal "godfather", has a nice article in his blog about the necessity for a contemporary CMS to have support for web-services built in. And his choice seems to be graphql and json api. I am sure that improving and promoting PW as a "headless CMS" kind of thing is something that could bring a lot of frontend developers to use PW. This module is the perfect start. As I understand, mutations are a way to not only read, but write data? If so, that is certainly worth implementing, so a complete SPA could be possible with this graphql module alone.1 point
-
1 point
-
Of course. In one of your templates (edit: In one of your template files) you simply do <?php echo $modules->get('ProcessGraphQL')->executeGraphQL(); and that's it. It will handle all GraphQL requests. There is more info in the repository.1 point
-
This is already implemented as far as I can see in the preview gif. The module requires PwCron and in the Event trigger dropdown there are time intervals to choose from. This is where an "OnSubmit" option is also included, but that one needs to be turned into a standalone button. @flydev That reminds me that you will probably need to handle the situation when a scheduled cron job will try to run while a manual backup is running (and vice versa...) I guess it is not a good idea to let both run at the same time. Edit: but I might be mistaken about the two jobs running parallel being a problem... I was just guessing here.1 point
-
1 point
-
Hi @Federico, welcome to the PW forums. I'm not really clear about what you're asking but here goes... You want an array of all GET variables? You can get that by using $input->get() without any argument. foreach($input->get() as $key => $value) { // sanitize each $value as needed, etc } But you probably don't want to treat each variable the same, pass it through the same sanitizer, etc. So I think it's more typical to check for the exact named variables you are expecting and ignore anything else that might be there. So for example, for "year" you are expecting an integer so you would apply $sanitizer->inUnsigned(). P.S. take a look at the search template for the Skyscrapers demo - it's a really good demonstration of the basic principles.1 point
-
1 point
-
Thanks @Sérgio, I should have read more attentively that part, I didn't know those textdomain where the thing I was looking for. The doc wasn't crystal clear for me, but this post made me understand the way to do it :1 point
-
Yes, by using textdomains: https://processwire.com/api/multi-language-support/code-i18n/#technical-details1 point
-
Yes, I am aware of field permissions, thank you for reminding. I have not added support for them yet. Though it is definitely in my todo list for this module.1 point
-
1 point
-
"How about a simple button "Backup Now" to do it ?" - Sure "I am looking for a good solution to name the packages files." - Normally I name them like this: 2017-01-28_13-55-17-anything-i-find-descriptive.zip Since you dubbed the module "Duplicator" you also implied that it will also be able to help in installing so I just wanted to make sure I got that right. Thanks again for the awesome work!1 point
-
Where comes the this from? Is this a class? Complete code? Usually it's because of the scope. Inside function you don't have this. Try this somewhere before ajax(): var that = this; then in the callback functions: that._Pagelist.set()1 point
-
Good point. How about a simple button "Backup Now" to do it ? This is a thing in which I have to brainstorm; But definitely yes. I am looking for a good solution to name the packages files. Thanks here. It was stipulated on my first post, this will be the best part of the module This one is the hardest part to implement in my point of view so it will come in a second time but ASAP! What I mean by ASAP - I will finish to implement Amazon upload and the s/FTP as this last feature is required to jump to the installer one.1 point
-
I always though graphql would only be for qraph databases, but really this looks damn rad.1 point
-
1 point
-
I don't know much about GraphQL but I want to learn more, and your module looks like it will make it easy to get started with in PW. So definitely interested.1 point
-
Nice. Those UIkit PHP functions will be a real bonus for anyone using the profile as the starting point for a website. I like the dummy text - what generator did you use?1 point
-
1 point
-
1 point
-
$config->urls->httpRoot https://processwire.com/blog/posts/processwire-2.6.18-updates-pagination-and-seo/#new-http-prefix-available-for-all-config-gt-urls-properties1 point
-
This is exactly what I’m looking for. Plus, the ability to habe fix aspect ratios like 16:9, 4:3 oder 3:2 (in addition to fixed pixel sizes)1 point