Jump to content


Popular Content

Showing content with the highest reputation since 11/14/2019 in all areas

  1. 5 points
    This looks like a reasonable approach! There is currently nothing like those tools you mention. What I've seen works for a lot of ProcessWire developers is to use the Repeater Matrix module to create content. Take a look here: https://processwire.com/store/pro-fields/repeater-matrix/
  2. 4 points
    Thanks for your answers, guys! I think I will also only support the UIKit theme. This will make the development a lot easier and I can concentrate on more important features!
  3. 4 points
    Even though I appreciate the idea of PW themes I think they would be somewhat limitating, fighting with the power of PW, where having your personal markup gives you freedom and uniqueness to projects. Pure HTML themes, instead, (not being bound to strict fields/relations) might be more appealing to me. If your goal is to make some revenue with them be aware that the market if fully saturated 🙂 My two cent here, of course 🙂
  4. 3 points
    I'd build a custom DB table that holds the id of the page and the id of the user that visited that page. page | user -----|----- 1 | 41 2 | 41 3 | 41 Get all pages that have been visited by the admin? SELECT page FROM visitedpages WHERE user = 41 Get all users that visited page 1? SELECT user FROM visitedpages WHERE page = 1 Executing custom SQL is as easy as that: Thousands of pages? No Problem 😉 Thousands of users? No Problem 😉 PS: If you only want an array of all page ids:
  5. 3 points
    Hi @Peejay, did you run the Additional steps / Install Snipcart products package in SnipWire module settings? This step installs product templates, files, fields and some demo pages required to build a Snipcart product catalogue. This additional step is needed to prevent unintended deletion of your Snipcart products catalogue when main module is uninstalled. In the current alpha version this isn't yet checked by SnipWire. If you did already run the additional step with an earlier SnipWire version there will be fields missing which were added in a later version. So you will need to re-run this step. The missing resources(fields, templates, pages, ...) will then be installed. Existing ones won't be touched! To re-run this step, you will need to edit/remove a key in database directly: DB table: "modules" -> find entry with class "SnipWire" -> edit the "data" field and remove the Json key: "product_package":true (be sure to leave a valid Json string - you will need to also remove the corresponding comma : {"api_key":"YOUR_LIVE_API_KEY","api_key_test":"ODQzZTc1MjktZGQxNy00YmUzLWFkMWYtZDE3MDQ2YTk1ODNjNjM2ODE3NTg5NzUyNDQxOTc0","api_key_secret":"YOUR_LIVE_API_KEY_SECRET","api_key_secret_test":"","snipcart_environment":"0","single_page_shop":"","single_page_shop_page":1,"credit_cards":["visa","mastercard","amex"],"currencies":["eur","usd"],"show_cart_automatically":1,"shipping_same_as_billing":1,"show_continue_shopping":1,"split_firstname_and_lastname":1,"snipcart_debug":1,"snipcart_css_path":"https:\/\/cdn.snipcart.com\/themes\/2.0\/base\/snipcart.min.css","snipcart_css_integrity":"","snipcart_js_path":"https:\/\/cdn.snipcart.com\/scripts\/2.0\/snipcart.js","snipcart_js_integrity":"","include_jquery":"","jquery_js_path":"https:\/\/code.jquery.com\/jquery-3.3.1.min.js","jquery_js_integrity":"sha256-FgpCb\/KJQlLNfOu91ta32o\/NMZxltwRo8QtmkMRdAu8=","excluded_templates":["promailer-email","promailer-subscribe"],"cart_image_width":65,"cart_image_height":65,"cart_image_quality":70,"cart_image_hidpi":1,"cart_image_hidpiQuality":50,"cart_image_cropping":1,"data_item_name_field":"title","uninstall":"","submit_save_module":"Submit","taxes_included":1,"webhooks_endpoint":"\/webhooks\/snipcart","include_snipcart_css":1,"taxes":"[{\"name\":\"20% VAT\",\"numberForInvoice\":\"\",\"rate\":\"0.20\",\"appliesOnShipping\":[]},{\"name\":\"10% VAT\",\"numberForInvoice\":\"\",\"rate\":\"0.10\",\"appliesOnShipping\":[]},{\"name\":\"10% VAT (Shipping)\",\"numberForInvoice\":\"\",\"rate\":\"0.10\",\"appliesOnShipping\":[\"1\"]}]","snipwire_debug":1,"data_item_categories_field":"snipcart_item_categories","product_package":true} After the key is removed, visit the SnipCart module settings again and re-run the product package installer! In the release version of SnipCart, this will be handled automatically. On each update it will check if there are new fields or other resources to be installed. Hope this helps! p.s. You could also completely uninstall the SnipCart module and then reinstall - this should also activate the product package installer link! -- Martin
  6. 3 points
    ProcessWire / Fullcalendar solution including comfortable planning app in the backend: https://vdt-icsa.de/program/ https://2018.tonmeistertagung.com/en/program/
  7. 3 points
    "Why is a simple calendar so hard to find?" Why the assumption that someone else will have created a plug-and-play solution for you? Web software exists if a web developer codes it. You are a web developer. Do you see where I'm going with this... 😉
  8. 3 points
    Ive been using signaturepad.js for this, its a js library that allows you to put an input field where users can sign (works really well on mobile), it outputs a png/jpg file that then you can upload to any image field you want (what i do for this on the front end is to upload the signature to a temp folder via ajax and then retreive the url and put it in a text field and then input that url to a $p->image->add($url); on server side, this works for a frontend implementation, i dont know if you require to do this using a processwire form
  9. 3 points
    Sadly, the rider of this new horse is dumber than a truck-load of doorstops. So I found another way to accomplish what I was looking for. In my opinion, it's hacky, as I still don't know the answers to my op questions, but it will work for now. The $_FILES['input_file_fieldname']['tmp_name'] works as the parameter to New WireUpload(). The result is a randomly created name saved in both the PageImages and file system. Using Soma's rename procedure to provide the original uploaded file's name corrects that anomaly. The result is an uploaded image with the correct (human readable) name. Anyone want to buy a horse? Only ridden once. Includes a new stick. Cheap.
  10. 3 points
    I think it should be: $page->fixtures->find("team_a=$teamA,team_b=$teamB");
  11. 3 points
    I guess you are referring to this. As far as I can tell from the Wikipedia article, there are different implementations of this and you probably need to be more specific about the one you need to use. Anyway I never heard of a ready-made ProcessWire module for this or a tutorial how to implement it. If there is some library that can be used out of the box, it is probably not so hard to do. I can imagine that Ryan could implement it for his FormBuilder as a paid add-on. I think it make sense to advise this route, because I've found JotForm have already done this and are offering widgets for their form builder. But that requires you to have some budget.
  12. 2 points
    Isn't that basically for whats the toggle of UIkit component is for? 😉 Understanding the basics is important. But if you have to build large websites is a solid foundation really handy, so you can focus more on the content than on writing basic components. 😀
  13. 2 points
    Thanks for reporting back! I just published a new version on GitHub which has some great performance improvements and a lot of other new features! The orders list is now loaded in 1 - 1.5 seconds (instead of 4 seconds). The dashboard is also affected by these changes and should load much faster now!
  14. 2 points
    Yeah, well in that case it really seems impossible. Can't you narrow it down with some other condition? has_parent, template, or similar? I know you said you want something future-proof, but certainly you are not adding new templates every day? Field dependencies let you write your own logic in plain PHP (one of many options), I guess Ryan has a reason he didn't allow such freedom when it comes to Lister (Pro or not) - probably security concerns. You might want to take a look at @bernhard's RockGrid module instead. A bit more work initially than just creating a new Lister Pro instance, but you're totally free to list / select / query whatever you like.
  15. 2 points
    Have you looked at the $session documentation? If so is there a specific problem you're having?
  16. 2 points
    Thanks @psy, I'll definitely try saddling a new horse. I'll miss the old horse. She was a beauty.
  17. 1 point
    Ah ok, I thought you didn't knew, that you could add animations to the toggle component. If you wan't another animation other than the animations of the animation component, you could add different classes and animate them with css. 😉 https://getuikit.com/docs/toggle#animations Sorry, it was not my intention to turn this thread into another discussion about frameworks. I just wanted to share my opinion, why I like to use them. But of course this is just my opinion and I also like to start with a blank page. 😀
  18. 1 point
    I am currently working on 2 large modules (SnipWire and GroupMailer). The further the development progresses the more complex it is to fully support the 3 main themes (UIKit, Reno and Default). What do you think: is it worth the effort or will the older themes soon disappear? Should I concentrate on UIKit only? How do you handle this with your modules?
  19. 1 point
    Well, there's no selector "if template / page has field_x", so a workaround could be two custom selectors: custom (field=value) 1 = meta%= custom (field=value) 2 = meta!= Make sure to check the checkbox on the right (make it OR rather than AND)
  20. 1 point
    Just use the root user with no password (of course only for development). See
  21. 1 point
    @charger I don't think that hashing graphql queries would cause performance problems. They are not that big. You should be fine.
  22. 1 point
    If you're serious about performance and don't have http2 available, you can optimize a lot with resource hints and service workers + cache API.
  23. 1 point
    A weird way to protect against DDoS but ok... Fingers crossed they will find a fix soon.
  24. 1 point
  25. 1 point
    I was literally suggesting FullCalendar as you replied. It's a great option. You just need to provide it with the JSON it needs and it works quite well.
  26. 1 point
    lol, i see amigo, I just didn't want to have to go re-invent the wheel, ya know? I'm liking this little gem https://fullcalendar.io/ Just gotta figure out the best way to implement it 😉
  27. 1 point
    This works for me, placed it in hannah code [[date]] var days = ["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"]; var months = ["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"]; var d = new Date(); datum = days[d.getDay()] +', '+ d.getDate() +' '+ months[d.getMonth()] +' '+ d.getFullYear(); document.write('\x3Cp>\x3Cstrong>' + datum + '\x3C/strong>\x3C/p>'); just change days and months names to your language, works like a charm!
  28. 1 point
  29. 1 point
    A module for managing files and folders. Supports creating, opening (e.g. viewing, playing, editing), renaming, moving, copying, deleting and searching for files. You can also view and change (not supported on Windows) file and directory permissions. https://github.com/matjazpotocnik/ProcessFileManager The author of FileManager component is (c) 2006 - 2018 Gerd Tentler, http://www.gerd-tentler.de/tools/filemanager/. I modified it to work with ProcessWire as a module. Please see license files on usage in commercial projects!
  30. 1 point
    You have to enable it in the module (Forgot Password) itself.
  31. 1 point
    Thank you - I knew I was doing something stupid... burning the midnight oil!
  32. 1 point
  33. 1 point
    Hey, @JeevanisM! You use an Integer Field for the phone number. Maybe that field cannot store such a big number as 9446196667? Test it with a 123 to check. I guess you should store a phone number in some other field any way. Text would be ok (with some frontend and server validation). There are dedicated fields for this as well like this one.
  34. 1 point
    @cst989 The issue could be that you incorrectly set ID of a page and then you get redirect to bookmarks page. Redirect is handled here https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module#L77
  35. 1 point
    I need to take a look at that, but unfortunately, I'm not hopeful that I'll find enough time this week. Next week should be a bit less crazy though. I haven't found the time to update to the latest FB release, but it looks like soon will be a good time to do so 🙂 Stay tuned.
  36. 1 point
    The Inputfields JS API is really cool, thanks @ryan! What do you think about adding a feature so that some (all??) of these JS functions could be triggered via URL query string parameters? As per my request here it would be neat to be able to create links (e.g. modal) to a form that automatically show/hide/highlight/etc particular fields.
  37. 1 point
    Hi everyone, I can't get my head around this, so maybe someone can help: I want to know how install the dev branch of processwire with composer. I use laragon and the "quick create" function and there you can run composer like this: "composer create-project processwire/processwire %s". OK, this is working, so I will get the master branch from it, but how about dev? I found some examples for laravel on this question, but no luck with it. Here some examples: composer create-project processwire/processwire %s --prefer-dist --stability=dev composer create-project processwire/processwire:dev %s composer create-project processwire/processwire:dev %s --stability=dev composer create-project processwire/processwire:dev %s --prefer-dist --stability=dev composer create-project processwire/processwire:dev-master %s --prefer-dist --stability=dev composer create-project processwire/processwire:dev-branch %s --prefer-dist --stability=dev composer create-project processwire/processwire:@dev %s --prefer-dist --stability=dev and so on... Maybe someone got this already and would like to share?
  38. 1 point
    That's where Dart comes in :-). Have a look at the docs and examples. With Dart alone, you can build anything from backend servers, console programs and anything in between. Erm, no you don't. Look at the real world examples/showcase. We are talking Alibaba, Reflectly, Hamilton Musical, and the likes. For iOS we have Cupertino Material design. I am not saying these alone are enough to go by but so far, and I have done extensive research, I have yet to come across anyone mentioning that they have to maintain two code bases. In fact, they all say quite the opposite - they have done away with two code bases and their UI renders exactly as they intended in their targeted platforms. How so? The only thing I don't like so far is the styling and structure baked right inside the widgets. I think flutter had the advantage of learning from other solutions and picking the best bits and improving on the not-so-good bits. I am not a zealot (yet :-)), but the more I dive deeper into Dart and Flutter, the more I get convinced that Google got this one right :-).
  39. 1 point
    FieldtypeFontIconPicker v.0.1.6 Fix FieldtypeFontIconPicker sanitizeValue() v.0.1.5 Added uikit icon select support (required AdminThemeUikit), because uikit icons not working standalone. v.0.1.4 : Fix issue FontIconPicker inside repeater v.0.1.3 : FontAwesome updated to 4.7.0 v.0.1.2 : Little Corrections Some works about icon pickers inside repeater via ajax load v.0.1.1 : FontAwesome updated to 4.6.3 v.0.1.0 : Custom CSS file url support Added hook method ___beforeRender(), you can check hook example for usage Added multiple icons library use option Added Ionicons Library Now module using cdn for load icon fonts v.0.0.9 inside dev branch Added hook method ___beforeRender(), you can check hook example for usage Added multiple icons library use option Added Ionicons Library Now module using cdn for load icon fonts v.0.0.8 FontAwesome 4.5 update, Improvements and Performance updates Important ! After update module check your input settings, because i changed input attribute names (This will only effect input options, like theme, category). Changed loading icon method from input:hidden to select>optgroup>option, added module js file for load and correct icon picker container many changes…. v.0.0.7 FontAwesome updated to 4.4.0 v.0.0.6 Missed... array compatibility for usage, from [$foo, $bar] to array($foo, $bar) v.0.0.5 Fix for oldest pw versions (Assets file loding scripts moved to inputfieldfonticonpicker module) v.0.0.4 Array compatibility for usage, from [$foo, $bar] to array($foo, $bar) v.0.0.3 Small z-index problem solved v.0.0.2 MarkupFontIconPicker added v.0.0.1 Start Point FieldtypeFontIconPicker Supported Icon Libraries FontAwesome 4.7.0 Uikit 3.0.0 IonicIcons 2.0.1 Cahangelog NOTE: Module store data without prefix, you need to add "prefix" when you want to show your icon on front-end, because some of front-end frameworks using font-awesome with different "prefix". Example : if($my-icon-field) echo "<i class='my-prefix-{$my-icon-field}' />"; Hook Before Render Example This example using /site/templates/admin.php file for hook wire()->addHook('InputfieldFontIconPicker::beforeRender', function($event) { if(!$event->return) return; // Get Input Name (For specified input hook, if you want apply all InputfieldFontIconPicker remove inputName check) $inputName = ""; if(isset($event->object->attributes['name'])) $inputName = $event->object->attributes['name']; // Get Input Name (For specified input hook, if you want apply all InputfieldFontIconPicker remove inputName check) if($inputName == 'icon_picker') { /** * Load your custom icons function file * Your array need to be same format with Icons/FontAwesome.php or Icons/Ionicons.php * Also you can pass directly an array */ wireIncludeFile('MyCustomIconFile'); // Set icons as $icons variable $icons = MyCustomIconsArray(); // Set your options $return = array( 'attributes' => array( 'category' => '', 'theme' => 'fip-grey', 'empty-icon' => 1, 'empty-icon-value' => '', 'icons-per-page' => 20, 'has-search' => 1 ), 'icons' => $icons ); // Return the event $event->return = $return; } $event->return; }); MarkupFontIconPicker Usage // MarkupFontIconPicker::render(YourIconField=string, Options=array) echo MarkupFontIconPicker::render($page->YourIconField, [ 'prefix' => 'uk-icon-', // Icon class prefix, if you have different prefix, default is : "fa fa-" 'tag' => 'span', // Icon tag default is : "i" 'class' => 'fa-lg', // If you have extra cutom classes, for example : icons sizes, Array or Sting value 'style' => 'your custom styles if you have' // Array or String Value ]); Screenshots - InputfieldFontIconPicker input settings Screenshots - InputfieldFontIconPicker page edit views Github Repo
  40. 1 point
    Just a brief update today. I’m going to give it another week before bumping the core version, as I don’t think there’s enough changes yet to warrant a version bump. For whatever reason, several of my clients have needed integration with Stripe (payments) over the last few weeks. I’d not worked with it before the last month or so, but now all of the sudden am working with it a lot, because that's what my clients have asked for. I’ve found myself working on four different Stripe integrations on existing PW sites, both Stripe Elements and Stripe Checkout. None of these are for sites that have an actual “store” where they would need a cart, but rather just “pay for your reservation”, “buy this book”, “buy this song”, and “make a donation of $10”, “make a recurring donation”, type things. After doing a few of these, I thought it would make a lot of sense to have this built into FormBuilder, which would save us time on this stuff. So this week I built Stripe support into FormBuilder (using the Stripe Elements API). It’s already fully functional, so I will be releasing a new version of FormBuilder with this capability quite soon. To add a Stripe payment input to your form you just add a new field of type “Stripe payment for FormBuilder”, and then it asks you for some info about it (like amount to charge) and then your form works as a payment processor. Stripe has a clever way of making this all work, so that the user never leaves your site, but your site (and FormBuilder) never sees credit card numbers or anything like that, so it’s secure and you don’t have to consider things like PCI compliance. I've also got some other unrelated updates for FormBuilder that I'll be covering soon as well. Have a great weekend!
  41. 1 point
    GraphQL requests are slow for sure, but 6 seconds is a bit too much. In my cases it usually took around 200-300ms. Not sure what's causing it to be so slow on your end.
  42. 1 point
    An update to the hook in the first post for PW v3.0.117 or greater. // Add a new 'chunk' method to WireArray, the equivalent of PHP's array_chunk $wire->addHookMethod('WireArray::chunk', function(HookEvent $event) { /* @var WireArray $wire_array */ $wire_array = $event->object; $size = $event->arguments(0); if( !((int) $size > 0) ) throw new WireException('WireArray::chunk requires an integer $size argument greater than zero'); $chunks = new WireArray(); for($n = 0; $n < count($wire_array); $n += $size) { $chunks->add($wire_array->slice($n, $size)); } $event->return = $chunks; }); This returns the chunks as a WireArray so you have the option of using WireArray methods. So if needed you could do something like: $items = $pages->find("template=foo"); $chunks = $items->chunk(5); $three_random_chunks = $chunks->find("limit=3, sort=random");
  43. 1 point
    Please test your query in a Graphiql. Insert your query in the Graphiql and confirm that the "product_single.list" is an array of nulls. Now remove every field inside the list and leave "id" and confirm that the list now contains objects with single "id" property in it. If that was successful then keep adding your "product_single" fields one by one. Whenever you see that the list is an array of "null"s, it means that exact field is causing this issue.
  44. 1 point
    Unfortunately I haven't had much time in optimization for this module. I'm very busy so can't promise any timelines when this will happen. The only thing you can do now is to keep your graphql schema as small as possible by unchecking all the unwanted fields and templates in the module config page. There is supposed to be a way to cache the schema (https://github.com/youshido-php/GraphQL/pull/37) I was planning to look into it. But never had a time for it and thus is not implemented in this module yet.
  45. 1 point
    Welcome to the forums @OxfordSUOliver If you have access to your files, paste the following temporarily into one of your template files and then visit a page that uses that template: $u = $users->get('sup'); // or whatever your supersuser name is $u->of(false); $u->pass = 'your-new-strong-secret-password'; $u->save(); Remember to delete the above from your template file once done. If you don't know the name of the supersuser, you can check this in your DB tables. See the pages table. Scroll down to user with ID 41 and check the string under the column name. Alternatively, temporarily again, in a template file, do the following: $u = $users->get(41); echo $u->name;// this is the name you want for logging in Note the original ProcessWire Superuser ID is normally 41, unless for some reason your colleague changed it, which would be highly unlikely, although they could have deleted that user having set up an alternative Superuser 🙂.
  46. 1 point
    I am happy that you like it @Sebastian, thank you for your support. I started the thread here because I thought this would be more like a discussion on how GraphQL and ProcessWire could fit together and wanted to get some feedback first. But this thread quickly become this module's official place here in the ProcessWire forums. Also @teppo included the link to this thread as the "dedicated support forum thread" in the 143 issue of the weekly.pw (which I was flattered to see ). Now I don't really know how to go on with this thread. Should we abandon it and start new thread in the modules section? Or maybe this thread could be moved to modules section? What @moderators think of this? Meanwhile, for those who are following this thread I wanted to mention that there are some additions in the dev branch, such as mutations that allows you to create/update pages and there is also support for FieldtypeMapMarker field. I stopped developing the module for some time because I thought that it needed a good testing before moving further with it and decided to built an SPA using this module, to see if there is something that need to be added or changed. But then I got carried away and started to make usage of third-party APIs such as Wikipedia and GoogleMaps. As a result the app does not make heavy usage of the ProcessGraphQL module, but it is still relevant to showcase the module's abilities. It is a US Skyscrapers app, duh... You can see it live here and the source code here (though I doubt that the code will interest you if you are not a React developer). I was finished with this demo SPA just couple of days ago. Now I will be back to continue to work on this module again.
  47. 1 point
    There is not need for different endpoint for users with different roles. The module does not have any authentication/authorization logic on it's own. The users that will be able to authenticate with this module are the same users in your ProcessWire installation. When I mentioned implementing authentication, I was talking about logging in via GraphQL api, like via AJAX. In reality it will be the same $session->login('username', 'password'), nothing more. No, no. Of course not. I am sorry for the confusion here. Legal templates mean legal for the api. It does not mean it will make it available to the public. Like I mentioned earlier the module checks if the requesting user has permissions to view, edit, create and etc. If say you select user template as legal. It does not mean it will be public. It means it is available via api to those who are authorized to view it, authorized via ProcessWire's access control system. I personally don't think there is even a need for the legal templates option. But it is helpful if you have too many templates and selecting only few can reduce the schema size and make api faster. I think there is a bit confusion about this. I want emphasize that this module does not make any data public, nor does it anything private. That is not the module's concern. The module's job is to make your data available in a JSON format, in addition providing the ability to consume that JSON data via GraphQL api. If the user does not have permissions to view a certain page according to ProcessWire's access control system then he won't be able to fetch it. The same goes for fields. When implemented the user will be able to access only those fields that he is authorized via ProcessWire's access control. But I will add an option for legal fields also, because that also could help reduce the initial schema size.
  48. 1 point
    Forked here to add support for editing module files from /site/modules, plus on PW3 namespaced textarea inputs are also detected: https://github.com/rolandtoth/ProcessTemplateEditor
  49. 1 point
    By default, ProcessWire only returns published pages...so, exclusion of unpublished pages is already done within a 'find'
  50. 1 point
    Quickly toggle your checkboxes with extra action buttons via AJAX. The module adds functionality to InputfieldCheckbox so you can toggle the checkbox fields in the extra action buttons intruduced in ProcessWire 2.6.5 via AJAX. Github Page Download Link Requirements This module works only for ProcessWire versions later than 2.6.5. How to Install 1. Copy the files to /site/modules/ProcessQuickToggle/ 2. In your admin, go to Modules > Refresh for new modules. 3. Click the "Install" button next to "Process Quick Toggle". Usage Go to any checkbox field you want to enable quick toggle feature for. Setup > Fields > my_checkbox_field. There in the Input tab you should see an Enable Quick Toggle field. After you check it you will see some fields that you can fill based on your needs. Then save the field. Now there should be an extra button for every page that has this field in the Pages tree. Features Supports template contexts. Supports core FontAwesome icons. Any kind of feedback is appreciated.
  • Create New...