Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/26/2019 in all areas

  1. You can install the predefined page-publish system permission: https://processwire.com/docs/user-access/permissions/#page-publish Then do not give the role that permission for the template of the page in question.
    3 points
  2. The modules configscreen now is aware of overrides from the site/config.php
    3 points
  3. I have tried them all, but 1password is worth every $ per month. Great application with great UX once you have set-up the right urls and 2FA. And great support too. edit: I see you ask for a free solution. I used Keepass a while, but I felt buggy and sync wasn't really great. So if you do freelancing or have a business a 3$/month would be a no-brainer in my opinion.
    2 points
  4. I'm not sure if I can blame the PHP library alone. It definitely could be one of the things that contribute to poor performance. But there are many more things going on. For example permissions is a big one. The schema needs to check the permissions for each field and subfields. So if you have lots of page-refs and fetching their subfields, it will check if the user has permission to view those fields. When you make a query inside your templates, the script already got access and don't do permission checks manually. It needs to be improved. Performance is very important. But right now I'm dealing with PHP library deprecation, because it's not maintained anymore.
    2 points
  5. A sad day for the internet, the EU, the democracy, and so much more. I don't know anything about any #article13 discussions, protests or media coverage in Spain or anywhere else but at least here in Germany - especially in the last weeks and days - the way of communication from politicians towards protestors, their statements against protests, and media coverage that supports that copyright directive were kind of shocking. They said some really weird things like... Online-protesters were bots. Mailings were from Google (as most of those mails came from gmail.com addresses). Those on the streets were paid [from big US companies]. ... and so on Yet another bad aftertaste especially for Germany and our politicians: https://edition.faz.net/faz-edition/wirtschaft/2019-03-26/f30a5870c08cc1e1b4524c1be19d1faf/?GEPC=s3 Maybe I never fully realized that degree of misleasing information from politicians and media but now I'm not only upset but actually really p*ssed. There seems to be a last option left but I really don't know if this will ever happen but... maybe. Back to your topic: those already big platforms will do fine with that. YouTube already has its Content ID system in place and therefore can offer APIs to those who will need it in the future. At least for video material. But the main issue I have with this copyright directive is this argument "Copyright-holders and creators should earn money with their work!" which is totally fine by all means. But that directive will not help any content creator on any plattform. How could it? Independent writers, musicians, DJs, fotographers, even programmers will still have the problem to find all those pirated copies of their work. They won't earn more money. They still have to prove their copyright claims. But on the other hand publishers got some more power to bypass money from the real creators. And they got their link tax foundation they always asked for. But... there is a positive side-effect. I learned to look closer. I learned to trust less. I learned to think more than twice. I learned who might not be on my side. And I learned who to vote for the next election. Regarding Alex Jones and de-platforming: That was never a real topic here in Germany at all. At least I saw only very few articles or side-notes somewhere or at the bottom of a newsfeed. That's it. And if you find anything about it, they applaud about it because he is some kind of a bad person. This narrative or bias at Twitter, Facebook, YouTube, [name more here] and the banning of people from their platform wasn't invented by those platforms. They would be doing totally fine even with all of those now banned people. Maybe even better. It was cultivated over the last few years.
    2 points
  6. ProcessWire doesn't like module names that have an uppercase letter at the second position, so switching that to lowercase should fix it. Just change CCBillIntegration to CcBillIntegration.
    2 points
  7. Announcement: I've created a new branch on github with the requested feature by @felix. Please can you and / or anybody else try this out and give some feedback. If everything is working as expected, I will push this to the master branch. Short introduction: You can specify how many and what ever params you want into an array that is called $config->wirmailsmtp. Every valid key of this array will override the key of the stored modules config setting. // example entry in site/config.php $config->wiremailsmtp = array( "smtp_host" => "smtp.example.com", "smtp_port" => 587, "smtp_ssl" => 0, "smtp_start_tls" => 1, "smtp_user" => "yourusersname", "smtp_password" => "youruserspassword", "extra_headers" => array("Organization" => "Horst Nogajski - Fotografie & Webdesign", "X-Header" => "Some Content") ); To see your resulting (merged) settings you can var_dump the output of the method getSettings(): // debug example in a template file $mail = wireMail(); echo "<pre>"; var_dump($mail->getSettings()); I tested it here myself and it seems to work fine. EDIT: I forgott to mention that I removed the required flags from the modules config settings for smtp_host and smtp_port. This way, both settings now may stay empty in the config screen, but can be set via the $config->wiremailsmtp array. The downside would be that the modules config screen isn't that robust anymore in regard of misconfiguration. Is this acceptable, or should there also be a required setting in the modules config screen? This is open for discussion. ?
    2 points
  8. ProcessWire InputfieldRepeaterMatrixDuplicate Thanks to the great ProModule "RepeaterMatrix" I have the possibility to create complex repeater items. With it I have created a quite powerful page builder. Many different content modules, with many more possible design options. The RepeaterMatrix module supports the cloning of items, but only within the same page. Now I often have the case that very design-intensive pages and items are created. If you want to use a content module on a different page (e.g. in the same design), you have to rebuild each item manually every time. This module extends the commercial ProModule "RepeaterMatrix" by the function to duplicate repeater items from one page to another page. The condition is that the target field is the same matrix field from which the item is duplicated. This module is currently understood as proof of concept. There are a few limitations that need to be considered. The intention of the module is that this functionality is integrated into the core of RepeaterMatrix and does not require an extra module. Check out the screencast What the module can do Duplicate multible repeater items from one page to another No matter how complex the item is Full support for file and image fields Multilingual support Support of Min and Max settings Live synchronization of clipboard between multiple browser tabs. Copy an item and simply switch the browser tab to the target page and you will immediately see the past button Support of multiple RepeaterMatrix fields on one page Configurable which roles and fields are excluded Configurable dialogs for copy and paste Duplicated items are automatically pasted to the end of the target field and set to hidden status so that changes are not directly published Automatic clipboard update when other items are picked Automatically removes old clipboard data if it is not pasted within 6 hours Delete clipboard itself by clicking the selected item again Benefit: unbelievably fast workflow and content replication What the module can't do Before an item can be duplicated in its current version, the source page must be saved. This means that if you make changes to an item and copy this, the old saved state will be duplicated Dynamic loading is currently not possible. Means no AJAX. When pasting, the target page is saved completely No support for nested repeater items. Currently only first level items can be duplicated. Means a repeater field in a repeater field cannot be duplicated. Workaround: simply duplicate the parent item Dynamic reloading and adding of repeater items cannot be registered. Several interfaces and events from the core are missing. The initialization occurs only once after the page load event Attention, please note! Nested repeaters cannot be supported technically. Therefore a check is made to prevent this. However, a nested repeater can only be detected if the field name ends for example with "_repeater1234". For example, if your MatrixRepeater field is named like this: "content_repeater" or "content_repeater123", this field is identified as nested and the module does not load. In version 2.0.1 the identification has been changed so that a field ending with the name repeater is only detected as nested if at least a two-digit number sequence follows. But to avoid this problem completely, make sure that your repeater matrix field does NOT end with the name "repeater". Changelog 2.0.1 Bug fix: Thanks to @ngrmm I could discover a bug which causes that the module cannot be loaded if the MatrixRepeater field ends with the name "repeater". The code was adjusted and information about the problem was provided 2.0.0 Feature: Copy multiple items at once! The fundament for copying multiple items was created by @Autofahrn - THX! Feature: Optionally you can disable the copy and/or paste dialog Bug fix: A fix suggestion when additional and normal repeater fields are present was contributed by @joshua - THX! 1.0.4 Bug fix: Various bug fixes and improvements in live synchronization Bug fix: Items are no longer inserted when the normal save button is clicked. Only when the past button is explicitly clicked Feature: Support of multiple repeater fields in one page Feature: Support of repeater Min/Max settings Feature: Configurable roles and fields Enhancement: Improved clipboard management Enhancement: Documentation improvement Enhancement: Corrected few typos #1 1.0.3 Feature: Live synchronization Enhancement: Load the module only in the backend Enhancement: Documentation improvement 1.0.2 Bug fix: Various bug fixes and improvements in JS functions Enhancement: Documentation improvement Enhancement: Corrected few typos 1.0.1 Bug fix: Various bug fixes and improvements in the duplication process 1.0.0 Initial release Support this module If this module is useful for you, I am very thankful for your small donation: Donate 5,- Euro (via PayPal – or an amount of your choice. Thank you!) Download this module (Version 2.0.1) > Github: https://github.com/FlipZoomMedia/InputfieldRepeaterMatrixDuplicate > PW module directory: https://modules.processwire.com/modules/inputfield-repeater-matrix-duplicate/ > Old stable version (1.0.4): https://github.com/FlipZoomMedia/InputfieldRepeaterMatrixDuplicate/releases/tag/1.0.4
    1 point
  9. Seems like a bug, or something that should be documented if "parent" is a special case for selectors. I opened a GitHub issue: https://github.com/processwire/processwire-issues/issues/838 As an alternative you can use OR-groups: $pages->find("(id=$page), (parent=$page)")
    1 point
  10. Thank you every one for your quick help ? PW Community is freaking awesome!
    1 point
  11. It seems that the user needs to have the page-edit permission for both the parent page and the child page in order to sort the child page. I hadn't noticed this before. It's a shame that the page-sort permission can't be granted independently of page-edit as it seems like they involve quite different levels of risk/responsibility. I opened a request at GitHub: https://github.com/processwire/processwire-requests/issues/290 As for a hook you could use this in/site/ready.php: // Just for your target role if($user->hasRole('editor')) { $wire->addHookAfter('ProcessPageEdit::execute', function(HookEvent $event) { /* @var ProcessPageEdit $ppe */ $ppe = $event->object; $page = $ppe->getPage(); // The names of templates that the user is not allowed to edit $disallowed_templates = ['colours', 'colour']; if(in_array($page->template->name, $disallowed_templates)) { // Replace the Page Edit markup $event->return = 'You do not have permission to edit this page.'; } }); } This may not be 100% secure in that a person could theoretically create their own edit form in their browser dev tools (although I think that's a very unlikely possibility). But if you wanted to be extra safe you could follow an alternative approach of limiting access at the field level for all the fields in the relevant templates. Depending on the number of fields that could be a hassle via the admin interface so you could look into doing it via the API.
    1 point
  12. If you created and assigned a single template whithout a template file to that page, setting it published should be no harm, I think, as it isn't viewable then on the frontend.
    1 point
  13. 1 point
  14. At least for 1Password there was a real good guide. LastPass allows CSV imports which make things easier. There is no real reson for you to move away. I have had license problems and didn't want to pay each month for something I already paid for several times. A while back they changed their pricing model and switched to montly fees. I have had 3 licenses (first one bought in 2007) in total back then plus the iOS apps and then suddenly it became awkward. I didn't feel comfortable being pushed towards monthly fees to use syncing and everything. They were nice and did some good moves for a while but at the end I moved nonetheless. I'm not angry with them and still recommend their solution but no... I'm out. Looked for an alternative solution and found it with LastPass.
    1 point
  15. Version Update 1.0.4 The current version has got some improvements, bug fixes and new features. Meanwhile a bit further than just a proof of concept. I would call it a beta version. I now submit it to the PW directory. IMPORTANT for an update from older versions: completely uninstall and delete the old versions! Only then install the new version. All information and downloads are updated in the first post. @kongondo Can you please move this topic under "Modules"? I think the module is out of development. Thanks a lot.
    1 point
  16. We have used ProcessWire for exactly this many times. It's VERY straight forward using the API. Now, if you don't feel confident in PHP then I would still suggest using WordPress and a plugin, but if you are willing to learn, it will be absolutely worth it as you can built it exactly how you want it and you can use the skills you have learnt for building other things in future. The ProcessWire API is very versatile and consistent, this means learning a way to do one thing such as using hooks gives you worlds of knowledge to do other things. It doesn't take long to pick up the entire API as it's very straight forward. If you need any help, let me know.
    1 point
  17. @szabesz Nice one, thank you. Yes, would I have known this from the beginning only! Getting a proper workflow done and will share here once results are somewhat solid. Missing this in the docs. Yes read through the issue, thx. I agree, would opt for all image manipulation to be external in a way. How I see it, ProcessWire is more for devs than ready to go for end users/clients. So let devs handle images the way they like and need. Sure ProcessWire is already doing that in a way, though it needs to be documented. Could not agree less with this https://github.com/processwire/processwire-issues/issues/703#issuecomment-470406082 And please put somewhere in the docs "If you have files in your assets folder for a page that follow a certain naming convention ProcessWire will serve them, regardless of having a db connection or not". https://github.com/Toutouwai/UniqueImageVariations looks interesting. What I am after really would be a module where devs can put in the command line for image encoding/conversion/dimensions/naming and have the pure libs, like cwebp and/or ImageMagick installed/integrated by default or at least as a module. I like to have control over what I do with the images and no rely on a 90 or 100 setting and guess what it going on exactly in the background. https://developers.google.com/speed/webp/docs/cwebp https://imagemagick.org/script/command-line-tools.php https://www.digitalocean.com/community/tutorials/how-to-create-and-serve-webp-images-to-speed-up-your-website Who knows, getting to know ProcessWire more every day and learning PHP alongside I might be able to write such a module myself.. ?
    1 point
  18. I have a site where I also take advantage of this. I implemented a custom image process algorithm, whereby I check the extension of the uploaded image, rename it and after that create predefined variations (using Imagick) based on the aspect ratio and/or the dimensions. I put all this into a custom module which hooks into InputfieldFile::fileAdded, something like: $this->addHookBefore('InputfieldFile::fileAdded', $this, 'hookRenamePng', array('priority' => 10)); $this->addHookAfter('InputfieldFile::fileAdded', $this, 'hookCreateJpgClones', array('priority' => 10)); BTW, have you read this Github issue? https://github.com/processwire/processwire-issues/issues/703 it is somewhat related.
    1 point
  19. Or you can force development mode for superusers. I guess Devilbox is preventing DETECT mode from determining whether you're on localhost or not.
    1 point
  20. Fixed a lot of these. I don't really want to change much else as it's a massive pain in the ass when they change the forum templates every other upgrade. Things like UIKit styles adding big padding on quotes - I could spend a long time tweaking UIKit to just target the header element only somehow I guess but it's easier to just include Ryan's stylesheets and override a single class (done, padding is now 20px) ? Accessibility - if someone wants to give me the CSS changes I can just plug in I'd be happy to do so. I don't know enough about accessibility to tackle that myself. Forum width is same as the site width which makes sense visually, though perhaps we're missing a trick nowadays and could have a helpful sidebar at larger screen widths? Maybe some sort of quick links for docs etc? I'm not sure - it's more work and it's taken me this long just to tweak a dozen styles - I don't get paid for this and have to prioritise client work to pay the bills ?
    1 point
  21. @happywire don't forget that a Page is not an array or similar, but a PHP object with protected and private fields. From the "top" (like print_r($page)) you may see some internal attributes (like the array of hooks), but you can not directly access those fields. To retrieve, for example, the table of hooks, you'll need to use an allowed method, like print_r($page->getHooks()). Same for any field placed on your template. Their content is not retrieved everytime you see a $page but only after an access. If you do something like $page->someField, then you do not access a member from that object, the Page object intercepts the access operator and retrieves 'someField' from the database, caches its content in the page object and performs any kind of output formatting specified for that particular field. So, to obtain a list of fields available on a particular page, you'll do a $page->getFields(), which you may use to enumerate all fields and dump their contents: foreach($page->getFields() as $fldName) { echo "{$fldName}: {$page->$fldName}<br/>"; echo '<pre>'; print_r($page->$fldName); echo '</pre>'; } Edit: if you print_r($page) before and after that loop you'll see the embedded ['data'] array populated. And similar will do for $image->getVariations();
    1 point
  22. "framework" and "web application projects" are very very loose terms... If you could describe a bit better what you are trying to build, I'm sure people could chime in with more "to-the-point" suggestions, or concrete real-life examples from their own experience. There are various ways how to extend / customize the whole backend. Custom dashboard, custom modules etc. @bernhard has an excellent, epic tutorial how to create your own module to handle potentially... well, just about anything you'd want. So, I guess if you want to get constructive feedback here, you should elaborate on what you're trying to achieve. And what exactly do you miss in PW that you have in Laravel or Silverstripe.
    1 point
  23. You could also use the Field Code section (created by @bernhard) which lets you copy / paste the API code need to create the field. Be sure to grab the very latest version of Tracy because I just committed a fix to this feature. It was previously missing certain properties. Note that this option is not enabled in Tracy by default so you need to go to the module settings and enable:
    1 point
  24. Go to the field edit page in the PW admin and then in TracyDebugger open the RequestInfo panel. This shows you all the properties currently set for a field. Just use these in the API as needed.
    1 point
  25. Hello, I had used comments fieldtype and it works perfect. Just right now compared what I had used and there are few differences, but first please check did you have on page Comments css and js files: <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->FieldtypeComments;?>comments.css" /> <script type='text/javascript' src='<?php echo $config->urls->FieldtypeComments;?>comments.min.js'></script> And call: <?php echo $page->comments->render(array( 'headline' => '', 'commentHeader' => '<span class="comment-by">{cite} <span class="date">{created}</span> {stars}{votes} </span>', 'useVotes' => 1, 'useStars' => 1, 'upvoteFormat' => '<span class="rate-review"><i class="sl sl-icon-like"></i> Helpful Review {cnt}</span>', 'downvoteFormat' => '<span class="rate-review"><i class="sl sl-icon-dislike"></i> Dislike Review {cnt}</span>' ));?> Please check and Comments settings inside admin where you can define stars rating (need to fill form or not). Regards.
    1 point
  26. @adrian Its only the extensions. maxFiles and outputFormat is set to 0 ((int) NULL) by default. @hellomoto No need to set inputfieldClass. The following is enough to get it work. $f = new Field; $f->name = 'myfield'; $f->type = 'FieldtypeImage'; $f->extensions = 'gif jpg jpeg png'; $f->save();
    1 point
  27. All right guys, another blow to the internet freedom. The united states of europe has voted for Article 13 and made it a fact. This is of course bad for innovation because little companies are getting a hard time to compete with the dominant platforms. Also independent content makers such as musicians and vloggers will have only a few dominant platforms left to distribute their work. The dominant platforms will get huge power to control public communication and discussions. Less freedom of expression and public discussions and more conformity to what is acceptable to the status quo. Here is a good example. Remember how Apple kicked Alex Jones from the internet ? Only a few days after that, Youtube, Facebook, Spotify and Twitter followed. We'll wasn't that a coincedence, right ? It only shows that these dominant platforms rule the same status quo and the same what is acceptable, instead of ruling their own interpretations of freedom of expression, choice and opinion. These dominant platforms have turned themselves into decision makers ! Deciding for us the people what we should see and hear and what not. If I don't want to see or hear or do agree or don't agree with Alex Jones then that decision is for us to make and not Apple, Youtube, Facebook, etc. It is not about Alex Jones and the content he brings to the public. It is about big platforms taking away our freedom of choice and our freedom of decision what we can see, hear or agree upon on the internet. This is in dutch so google translate it to english: https://www.nu.nl/internet/5810511/brussel-stemt-voor-nieuwe-auteursrechtenwet-met-uploadfilter.html https://www.bitsoffreedom.nl/2019/03/26/europees-parlement-stemt-voor-artikel13-en-nu/
    0 points
×
×
  • Create New...