Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/19/2018 in all areas

  1. Yep, well took a bit longer reading the doco, experimenting etc and my site was already live. Now I know how to do it, will only take 15 minutes next time. Steps: Create your icons. I only had up to 256x256px. That's old hat. Now you need up to 1024x1024px. Decided to go with my existing website/app icon set anyway. Go to http://www.manifoldjs.com/generator and fill in the blanks Generate the files, download the kit, edit the files and/or your PW template(s) required and upload to the root directory, not /site/ directory, of your ProcessWire site Woohoo!!! Works great with a couple of provisos: The online builder does not work for Mac, iOS and Windows 10 devices, only everything else. Found it somewhat ironic it lacks Windows 10 support as this is a Microsoft product. No surprises there! For Mac, iOS and Win10 you have to use the PWABuilder CLI, almost formerly ManifoldJS CLI as it's going through a name change. Would be ever so grateful to anyone who can tell me how to do that. Followed the instructions to the letter, and also multiple variations, and could not get the CLI version to install/work and I definitely have the latest versions of Node and npm. PWABuilder delivers a manifest.json file and a couple of basic service workers, without all the fuss associated with SPAs, REST APIs etc, for small, informational websites. Watched a video recently that amongst other things, stressed PWA != SPA. Took me a while to get that. (Tip: skip the ads) While not yet perfect, PWABuilder was a good introduction for me to PWAs for ProcessWire.
    9 points
  2. I am happy to present you the first processwire powered page i made for a client. Some more in the pipeline, but on hold because of missing content on the client side Big thanks to this helpful and great community!! https://feuerwehr-gimbsheim.de/ my own site webgestaltung.net is online for a while already, but not holding much content yet.
    8 points
  3. @MarcoPLY You have to call the module by using an ajax request in order to avoid the redirection when the user click. In the following example, I am using jQuery (I'm lazy) and the modal script from w3c and a new template LoginRegister.php for the example : Code of the template : JavaScript code :
    3 points
  4. Thank you @flydev! Yes this it's other option and works. You put me again on the right way, thank you! Only I have to load just a part of the page, the form in #LoginRegister. So I have did this: $.ajax({ url: './', // target url (selff here) type: "get", // GET because LoginRegister use GET variables data: 'register=1', // url param success: function(data){ $('#LoginRegisterDiv').html($(data).find('#LoginRegister').html()); }, }) About the module, now it asks to be confirmed before activating the account. It's possible pass this function? and make active the account after the registration, and maybe just add a confirmed screen for let be more clear. Thank you flydev, you help me a lot!
    2 points
  5. Hi guys, sorry for the delay in replying. I am going over the following details from this thread and will post an update ASAP: Install issues - blank file path, notices. UIKIT theme CSS conflicts. returning data on non-recurring events all day toggle render methods and output overrides. As soon as I have an update, I will post it here to the forum.
    2 points
  6. Sorry I can't understand all the post ?, can you please post some code or explain "better" what you are trying to achieve ? You can use LiceCap to show us a screencast of what happen on your page.
    2 points
  7. Another framework from China: https://github.com/walkor/Workerman
    2 points
  8. I would recommend to try the form template processor, it should still work. Formbuilder is also a solid choice. Easy to create forms, and pages from the forms, and also add your own scripts and styles to forms, hook into form process and do advanced things.
    2 points
  9. 2 points
  10. Hmm, why? Do you have an upcoming project? Although we are in 'Off Topic', I don't get the point of starting a new thread instead of 'continuing' the discussion (if there is one), using the existing threads:
    2 points
  11. Well, I am using this field for the first time and really wanted this functionality, so decided to fork the module here: https://github.com/adrianbj/processwire-fieldtype-assisted-url It doesn't look any different from the users perspective, but on save/sleep it stores the page ID instead of the url and then on wakeup it converts to ID back to the URL. This means that you can now move a page to a different parent, rename it, etc and the link URL will be automatically updated. It doesn't look like @wumbo is still active around here, so not sure if this will make it into the main version of the module, but it's there if others want it.
    1 point
  12. Yes that's what I do for the most sensitive data (disclaimer also a relative noob). For those sensitive fields there's nothing readable on the PW server and it calls a remote server to decrypt - basically exactly as you've outlined - checks the IP address of the incoming request then does the decryption and returns as required. It just means that any MySQL dump from either server in isolation is useless, and even if the MySQL dump and the PHP files from the main server are available it's one more step away. (The remote server MySQL only contains a PW ID key and the encrypted data so nothing identifiable really). So it's not perfect but would require someone gaining full access to the server in situ (ie on it's current IP address) rather than just hacking a backup somewhere. Given the data is identifiable but relatively innocuous I hope that's enough to get anyone malicious to give up and go after one of the millions of Wordpress sites Backups are (maybe wrongly) really my biggest concern. Goodness knows how many there are floating around with web hosts doing auto backups, sitting on my own hard drives, backups to Dropbox, sitting in PW database backup folders on the server etc Again, I'm not dealing with catastrophic data (eg credit cards) so I figure a level of hackery is OK. For one site we store a person's bank account number so we can generate batch bank payments to them (ie it's nothing that's not sent around on an invoice - we can pay into the account but not draw from it obviously) but I really didn't want hundreds of names, addresses and bank numbers sitting in a MySQL dump in clear text anywhere.
    1 point
  13. @zoeck It's doable by two Page reference fields. Take a look at this thread
    1 point
  14. Velotraum is a small German manufacturer, building rather costly, individually manufactured bicycles for both globetrotters and everyday bikers. We use RepeaterMatrix for long structured texts, and we use a lot of individual fields for metadata. We even built our own "preview" function for blog comments and included Textile light for blog comments, too. Have a look: velotraum.de
    1 point
  15. I don't have a similar setup to quickly do tests myself, but... in your projects template, can't you try to use a page-reference field and use a custom/advanced selector for the allowed pages (using PHP code)? Another thing that might work: install the Connect Page Fields module https://modules.processwire.com/modules/connect-page-fields/
    1 point
  16. Unrelated, but I've been struggling with gif screen capture the whole morning, and your post saved my day. Thanks.
    1 point
  17. Hi Netcarver, Currently, I am still unable to break that limit or 2800 repeats of an event. Even so, that is a long time: Example Recurring Time: Daily = approx. 7.5 years Weekly = approx. 53.5 years Monthly = approx. 233 years Yearly = approx. 2800 years I am working on a copy of recurme with a revised interface but it is nowhere near complete. The current exclusion works ok for 99% of the use cases. Although I do agree that it could be GREATLY improved. I would like to focus on fixing the more pressing bugs before releasing any huge changes to the interface.
    1 point
  18. Thanks Adrian. I went with Option 7. Works well. I guess my mistake was keeping 'multiLine' -> true assuming it to be a pre-condition to paragraph formatting.
    1 point
  19. But the text and textarea sanitizers don't allow html tags by default and there is also this comment: 'multiLine' => false, // allow multiple lines? if false, then $newlineReplacement below is applicable Hopefully this will help show what is happening and what the solutions are. You can either go with the option on line 5 or line 7 although if you go with 5 you might also want to adjust the 'maxLength' option from the default 255 depending on expected content.
    1 point
  20. Disclaimer: Complete noob in security here. So, at the risk of sounding silly, would it make sense to keep the key in a different server? I mean, if the site's server is compromised, the key would be visible in the code. So, I'm thinking the key could be stored in a different server that's "completely airtight", and the only thing it does is listen to a key request from the main site's server, checks the IP and lends it the key. So any site scripts that needed to handle an encrypted field would have to make that request first. Does this make sense? Or would a breach where someone can access the DB + PHP files be so far gone that they'd also easily make the server request and expose the key?
    1 point
  21. Yeah, although I guess the main difference is that I have added other URLs to search too, like pw-recipes etc.
    1 point
  22. @bernhard, @dragan's is different (e.g. it has image search in there) from the one I use which I think has been around a lot longer .
    1 point
  23. @noelboss don't know your exact scenario but you could maybe use something like FEEL or the pw-panel or just an iframe to achieve that?
    1 point
  24. Did you try to merge your two custom modules into one? And also (since it seems to be a live site): can you go back to an old state (backup) where you are sure everything worked fine?
    1 point
  25. I discovered Swoole via a Quora answer to the (silly) question "Will PHP die in 2018?". https://www.swoole.co.uk/ https://github.com/swoole/swoole-src It's way above my skill level so I only have the vaguest grip on what it's all about, but it sounds pretty wild. Just thought folks here might be interested in checking it out.
    1 point
  26. Saving a complete user object also doesn't seem to work. When I try something like this, only the username gets saved, none of the other fields - except maybe addRole: $u = new User(); $u->of(false); $u->firstname = $sanitizer->text($input->post->firstname); $u->lastname = $sanitizer->text($input->post->lastname); $u->name = $sanitizer->text($input->post->name); $u->email = $sanitizer->email($input->post->email); $u->registrationDate = time(); $u->addRole(''); $mainsite->users->save($u); Or am I doing something wrong? This works: $newuser = $mainsite->users->add(); $u = $mainsite->users->get( $newuser->id ); $u->of(false); $u->firstname = $sanitizer->text($input->post->firstname); $u->lastname = $sanitizer->text($input->post->lastname); $u->fullname = $u->firstname.' '.$u->lastname; $u->name = $sanitizer->text($input->post->username); $u->email = $sanitizer->email($input->post->email); $u->registrationDate = time(); $u->addRole(''); $mainsite->users->save( $u );
    1 point
  27. Forgot to show where $forum is defined in your example code? Would be good to show the complete, correct code to help others, thanks.
    1 point
  28. $bool = $user->isLoggedin(); https://processwire.com/api/ref/user/is-loggedin/
    1 point
  29. The GDPR was approved two years ago, so how much more grace period should there be? As with each new law it's not going to come with any set of "best practices". They'll be worked out as the first lawsuits are held and concrete situations will be applied to the rules. There just isn't anyone out there to really finally interpret written law into concrete ways of handling thing besides judges in a lawsuit. It's a bummer that the ePrivacy rulings, which are supposed to go more into detail in the enforcement of gdpr in the digital world are still in the sad state of being nowhere near final. There are also various sources reporting that the ePrivacy laws won't be able to come into action until mid 2019 based on what is still to be approved by the EU and it's member countries. That might be the case in places, but as the GDPR is enforced for each company working with data of european citizens it's going to hit almost any globally active company as well as european ones. E.g. AWS is already claiming that they're gdpr compliant. For heroku I didn't find conclusive info, but salesforce (which owns heroku) does have extensive information on gdpr and how to comply when using their service. So if US companies want to make money in europe they'll have to deal with compliance.
    1 point
  30. Thanks for this idea and example. This makes it super easy and economical to create multi-edit field types for settings which belong together.
    1 point
  31. Great module, I am using it extensively Couple of questions: - Do you know how to merge or prepend a multipage pdf file to the dynamically generated one? header and footers are repeated for all pages, whereas I am looking for something like a table of content - Is there any possibility to update the mpdf to the 7th version from the current 5.6? thanks a lot!
    1 point
  32. Code Blocks Textformatter is a tiny Textformatter module I cooked up to add support for code blocks to text/textarea/RTE fields on some of the sites I work with. Unlike a full-blown Markdown Textformatter – which is something that we already have in the core – this module simply adds support for fenced and inline code blocks. The syntax is based on the GitHub code block documentation, so please refer to that for additional instructions. The README at GitHub also includes some basic examples. As with any Textformatter, in order to enable this one, install it and enable it via field settings. Note that there's no syntax highlighting built in (at least for the time being), so use a tool of your choice for that – personally I prefer Prism.js. Since this module doesn't use a Markdown tool behind the scenes, but rather some home baked regular expressions, there's always the possibility that I've missed something – but please let me know if you use this module and run into any issues. On the other hand this module should be relatively fast and unobtrusive, as there are no unnecessary bits of code to run GitHub repository: https://github.com/teppokoivula/TextformatterCodeBlocks Modules directory: http://modules.processwire.com/modules/textformatter-code-blocks/
    1 point
  33. // Grab a page from the trash and restore it $trashedPage = $pages->get(1234); $pages->restore($trashedPage); http://processwire.com/api/ref/pages/restore/
    1 point
  34. Yep - field/template overrides are great. re: working in a team I'm a big fan of JIRA (or similar tools). It's good practise to chunk your project into smaller tasks and sub-tasks. We even use it sometimes to estimate hours for quotes. If used right, everyone in the team sees who is working on what (swimlanes view).
    1 point
  35. Thanks bernhard for a very informative post. I do have a follow-up question though: How would i make the new panel / custom admin page accessible to a non-admin role? Currently it works great as superuser / admin using another role, logged in as a non-admin user there's only the "pages" tab, nothing else. The way I understand it, since it uses the "admin" template, I can't really manage access through template settings (?). I might overthink this though, anyone got an idea? Edit: Actually, i'm sorry, this is a duplicate of Which of course i found 2 minutes after posting the question, but not during the hour of research before..
    1 point
  36. @Loges: Somewhere in the middle of my (unfortunately growing) todo list is a field encryption module (or, precisely, a whole set of them for different scenarios). The bad news is that it's been there for a while and regularly been overtaken by reality (speak crypto api changes, now a badly under-documented libsodium, breached algorithms, etc.) and I've been hesitant to roll out something that might not be future-proof. You should be able to implement something quickly though if you don't aim for a generic, fool-proof-in-any-environment solution. With PW's hooks api, you could even add encryption to existing field types like FieldtypeText and its descendants. Here's a short rundown of my thoughts that might get you started with your own module: Use symmetric encryption, store your key in a property in site/config.php, make sure to avoid insecure combinations like AES256 with ECB You need at a minimum the following hooks: FieldtypeText::sleepValue where you encrypt the field values for storage in the DB. Be aware that the value passed to that might either be a string or an array of strings (in multi language sites), each of which you need to encrypt. FieldtypeText::wakeupValue where you decrypt the db values for use inside PW. You get either a string value or a LanguagesPageFieldValue object (multi language sites) for which you need to decrypt the value for every language (use getLanguageValue/setLanguageValue). FieldtypeText::getConfigInputfields to add a property (InputfieldCheckbox) that determines whether to use encryption (and is checked inside sleepValue/wakeupValue) in the field's configuration Use a truly random initialization vector (IV) for encryption, which is, depending on PHP version and configuration, sometimes harder than it sounds. Of course, back up your encryption/decryption key really good
    1 point
  37. https://thesmartgroup.ie/ We launched this earlier in the year, I'm only just getting round to sharing it. This is the 4th iteration design wise in the past 5 years and personally my favourite in terms of design. The old site was PW based so we had a lot of the content in there but undertook a major re-write and claw back to make everything cleaner and more succinct - relying on more visuals to promote the work we do rather than verbose copy. The site is not using anything out of the ordinary, just standard modules I tend to use for all PW sites: AIOM SEO Markup Sitemap XML AutoSmush MenuBuilder: Markup The site loads pretty darn quick considering it's using a lot of images and many of them are 96DPI for better display on Retina.
    1 point
  38. Hi guys, here is our most recent website http://patina-store.de/ Patina is a really nice vintage objects and furniture store here in Wuppertal. Pay a visit if you pass by We are aware of some flickering and strange scrolling (seems to happen with Safari on desktop and iOS) on the homepage initial transition. I'm looking into it, but if you guys could report how it's behaving with you, it would be a great help! A point of interest is the Lookbook page. For this we used the Image Marker module by @kongondo and @heldercervantes, which worked flawlessly. Thanks guys! Although the site is very simple, PW has a very important role, since we transitioned all the shop organization (mainly the products) from excel spreadsheets to it. We could say PW is acting as a small CRM, and Lister Pro is doing a great job at it.
    1 point
  39. Ok... I actually figured it out. I just found this page which helped.... https://processwire.com/api/ref/page-array/add/ Here's what I ended up with.... $p = new Page(); $p->template = "basic-page"; $p->parent = "/api-generated-pages/"; $p->title = $randomTitle; $p->pageoptions->add(array(1023,1026)); $p->save(); Fortunately I had read a few threads looking for the solution and that is what helped me add the array in to add multiple pages into the page field at once. Hope it helps someone else! Have a great weekend everyone!
    1 point
  40. I've updated PageFinder to support both the SQL_CALC_FOUND_ROWS and the COUNT(*) method so that I could compare them. I found some interesting results. My conclusion is that COUNT(*) is indeed faster in many instances, but SQL_CALC_FOUND_ROWS is faster in many other instances. Sometimes one is even twice as fast as the other, making me think we might need to build some logic into PageFinder to help it decide which method to use. Though I'm not yet certain why one is counting so much faster than the other at present. Here are the results. Numbers are in seconds. This was testing on a site with ~45k pages. 1. Selector: id>1 (matches 45786 pages) AVERAGE TOTAL (50 finds) ------------------------------------------- CALC: 0.030606 1.5386 COUNT: 0.026732 1.3451 WINNER 2. Selector: template=facility (matches 38008 pages) AVERAGE TOTAL (50 finds) ------------------------------------------- CALC: 0.197568 9.9118 COUNT: 0.183608 9.2142 WINNER 3. Selector: template=facility, title*=senior (matches 1207 pages) AVERAGE TOTAL (50 finds) ------------------------------------------- CALC: 0.053222 2.6943 WINNER COUNT: 0.08826 4.4469 4. Selector: template=facility, capacity>5 (matches 28616 pages) AVERAGE TOTAL (50 finds) ------------------------------------------- CALC: 0.347964 17.4320 COUNT: 0.208856 10.4764 WINNER 5. Selector: template=facility, capacity>5, zip!='' (matches 28145 pages) AVERAGE TOTAL (50 finds) ------------------------------------------- CALC: 0.61547 30.8082 COUNT: 0.407376 20.4028 WINNER 6. Selector: capacity>5, zip!='', limit=2 (matches 28145 pages) AVERAGE TOTAL (50 finds) ------------------------------------------- CALC: 0.435284 21.7988 WINNER COUNT: 0.903338 45.2016 7. Selector: capacity<5, zip!='', limit=2 (matches 4713 pages) AVERAGE TOTAL (50 finds) ------------------------------------------- CALC: 0.097256 4.8961 WINNER COUNT: 0.176476 8.8574 Here is the script I used to test: <pre><?php include("./index.php"); $timers = array(); $selector = "id>1, limit=2"; // change to desired selector $totalTimer = Debug::timer(); $totalRecords = 0; $max = 50; for($n = 1; $n <= $max; $n++) { $timer = Debug::timer(); $items = wire('pages')->find($selector); $totalRecords = $items->getTotal(); $elapsed = Debug::timer($timer); $timers[] = $elapsed; // clear the find() cache so it doesn't get reused on next find() wire('pages')->uncacheAll(); } $total = 0.0; foreach($timers as $elapsed) $total += (float) $elapsed; $average = $total / count($timers); echo "Selector:\t$selector\n"; echo "Average:\t" . $average . " seconds per find()\n"; echo "Total Time:\t" . Debug::timer($totalTimer) . " seconds for $max find()s\n"; echo "Total Pages:\t$totalRecords\n";
    1 point
  41. Okay, first of all, I have not done that with websites - well, I did many, many years ago with a large community site, but that was chaos! However, I have managed huge event productions and video productions where you have a lot of different talent supplying different technical skills with a lot of overlaps. I also have a nephew who is a lead developer on several very large games. The trick I have found is to try and reduce overlaps and to make sure the main development parameters are set in stone BEFORE anyone starts coding, drawing or anything else. So, everyone should know what it is meant to look like, understand every aspect of the brief (not the client brief, but the one you write as project manager) and know exactly what their responsibilities are right down to what scripts or functions they should be writing. AS part of that process it is worth having a short lived debate on style and structure, then put that in the brief too. Then, when someone goes sick or drops out, their work can be understood. That project brief document is important and is often neglected. The last time I did one was for a community zone for an online game where the community applications would need to talk in detail with the game application. Horrendously complicated! The final project bible for that was 40,000 words long - but nothing was missed out and in the writing of it, we solved huge amounts of tech problems and knew what it would look like, how it would feel and had even tested out how it would work with players and what they thought. It just needed to be manufactured - and it would have been if the people behind it had actually coughed some money up! I am often amazed how many large projects are created on the hoof - but then, going by how many IT projects end up as camels (a horse designed by committee) , it is probably no surprise at all. Imagine Ford walking onto his first production line and saying, "Okay, guys, we are going to make the first mass-produced private vehicle. No, sorry, I have no idea what it is going to look like or how it will be put together, but I am pretty sure it will be called the Model ... er ... something. Right, turn the production line on!"
    1 point
×
×
  • Create New...