Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/20/2016 in all areas

  1. Thanks! The module is only half of the picture, there should be a system that allows such mods I've added a "highlight rows" tweak that adds a slight background color when hovering on pagelist row items an AdminDataTables items. This helps keeping the focus when having long rows. This features modifies the main pagelist so that opened items get bold. I find it helpful because the hierarchy is more clearly visible.
    6 points
  2. $fieldgroup = $template->fieldgroup; $f = $fieldgroup->getField($fieldName, true); // Do stuff $fields->saveFieldgroupContext($f, $fieldgroup);
    5 points
  3. File Editor GitHub https://github.com/f-b-g-m/ProcessFileEdit matjazp version https://github.com/matjazpotocnik/ProcessFileEdit A module that allows you to edit file directly in the in the admin area. First module and first time doing a file editor so the way i do it might not be the best. Feedback is welcome. Editor page Setting page
    4 points
  4. Disk swap is needed when some portion of disk space must be reserved to be used when the system RAM is full, so the disk acts like RAM (although much slower). The default is zero on a fresh Ubuntu install and for lower RAM servers like this one should be at least the double (it's recommended 2GB for 512MB). Serverpilot (that you're using) enables 512MB only: https://serverpilot.io/community/articles/swap-is-enabled.html So I recommend you to log as root and increase it. https://www.digitalocean.com/community/questions/how-to-change-swap-size-on-ubuntu-14-04 And look here too: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04
    2 points
  5. Next version will contain a fix for the missing image labels in the image select screen:
    2 points
  6. Thank you very much... btw PW is awesome CMS. thanks
    2 points
  7. definetly! have posted an issue on github. PS: welcome to the forums!
    2 points
  8. Well if they get used to the pencil icon then when wil they learn the default PW workings? There's an issue in the module: its SettingsJS.js is added not only in the module's page but every (admin) page and asmList items get the "pencil" icons. Of course clicking on them do nothing, apart from this error: SettingsJS.js:50 Uncaught TypeError: Cannot read property 'undefined' of null Setting line 42 to this fixes it: if ($this->wire('user')->isLoggedin() && $this->input->get('name') == __CLASS__) {
    2 points
  9. Honestly it looks like you module might be more complete - you are using a js code editor which would make for a much nicer editing experience and it looks like your use of php file tree also makes for a better interface. I don't think this should be hidden at all - I think I'd rather see it in the modules directory as well as Nico's, rather than being lost.
    2 points
  10. Hi @Juergen - please try the latest commit - I switched it from using validator.nu to validator.w3.org/nu/ and it seems to be fine now. They both use the same checker so hopefully everything will be fine. I have a feeling that this might be a bit of a moving target though, so if anyone ever comes across issues with it, let me know and I'll try to get it working again.
    2 points
  11. This one can easily happen when @adrian is neither on holiday nor sleeping Anyway, welcome to the Forums and have fun with ProcessWire!
    2 points
  12. Give us chance We will need some more info. Is ./inquiries/ really pointing to a PW page that has the inquiries.php template assigned to it? Is that page definitely being loaded? If that page is being loaded, what do you get when you dump $_POST?
    2 points
  13. This module provides a solution for keeping various site settings in one place (titles, slogans, api keys, emails, addresses, etc.). Features - Admin can create unlimited number of settings - Settings can be grouped - Admin can set setting label, notes, property name, field width and type - Settings can be of type text, checkbox, radios, select, email, url, integer How to use In module configuration create as many settings as needed. Customize their label, type, width and provide a name you want to use in a template files (property name). After that admin can set those settings on "General Settings" page in "Setup" section. Every time you wish to output eg. site name you can use $settings->site_name or wire('settings')->site_name or $settings->option2 to get value of 'Check it' as seen on the first screenshot. (Checked checkbox returns 1). You can change global name ($settings) to something else in module configuration. To get basic markup with all settings and their values use $settings->render(), usefull to check returning values (esp. select/radios - their values are sanitized as page names). Current limitation: -no way to change order of settings, -new settings can only be added at the bottom. Multilanguage To make fields multilanguage aware create a field with a same property name with '_languageName' appended. Example: Your site has two languages: default and french, create site_title and site_title_french fields. Put in a template $settings->site_title. If a user has set french language, this module output site_title_french, otherwise site_title. Please notice that render() function is not language aware. https://github.com/pmarki/ProcessGeneralSettings
    1 point
  14. The changes I made will only affect the console - it's just a matter of whether the encoding change breaks anything else. I checked the pageNameUTF8 sanitizer (because it was the issue that you had with that which resulted in the change that deleted "+" signs) and that still works great, so hopefully we are good
    1 point
  15. works! thank you. i hope it does not affect any other parts of tracy
    1 point
  16. I found it - the "++" is being lost, so it's processing: echo $i ; hence the continuous loop! Must be some encoding issue. I was url encoding, but I stopped doing that to fix another issue. I will revisit and see what I can do to fix. Thanks for reporting.
    1 point
  17. can anybody tell me what is wrong with this code? $i = 1; while ($i <= 10) { echo $i++; } it works inside a template file, but inside the console it leads to endless 100% cpu
    1 point
  18. As you're using Nginx in front of Apache, maybe it's worth to try this: https://github.com/mariusv/nginx-badbot-blocker
    1 point
  19. Enclosed you find a json file with my attempt of a GERMAN translation. Feedback is welcome (please as PM so we do not loose focus on the main topic of this thread.) If everything's fine, I will pass it to the German language team for inclusion with the forth-coming PW V3 strings. site--modules--croppableimage3--lang--croppableimage3textcollection-php.json
    1 point
  20. This was present only if PagePreviewBtn was off, will be fixed on the next update.
    1 point
  21. I cannot see the tooltip for editing the template any more, which is in the breadcrumb. (Default theme, the information is still there in the source code - but the tooltip is not shown, maybe misplaced and hidden somewhere) - Am I the only one having the issue?
    1 point
  22. Are you using namespaces? If so then it would need to be (\Exception $e)
    1 point
  23. Good day! It seems like I got about the same question, so will post it here. I have this code $nextAction = $p->next_action; try { $this->$nextAction($p); } catch(Exception $e) { bd($e, 'Exeption!'); } and it does not work if a call a method that does not exist. I get a WireException, and it is not caught by try/catch. Is there a way to make it work? P.S. bd() is from awesome Tracy Debugger. If you do not use it yet you certainly have been away to a far away planet or do not do any code in PW .
    1 point
  24. @fbg13 Please do add this to the PW modules repository!
    1 point
  25. Positive sideeffect ! Great!
    1 point
  26. Awesome! It also seems like the w3.org version that we're now using is significantly faster - I was typically getting 750 to 1000ms times on the validator.nu service - now it's around 500ms.
    1 point
  27. Hi adrian, it works now as expected!!!! Thanks!!
    1 point
  28. As long as we hit the target we are quite happy with it, I think Oh, and thanks a million as always!
    1 point
  29. Does this only happen with this template? Does it happen with ML support disabled? Any third party modules that might be affecting the page name/title?
    1 point
  30. I have reorganize module settings, it uses JSON and ASM Select for fields, now it's possible to reorder settings, add, delete and so on. The only drawback is that it's not compatible with previous version. If you want to update, you will lose all entered settings.
    1 point
  31. I really love this module and think its features should be in core. So much flexibility. You can customize the backend to your preference.
    1 point
  32. I think you are right that will did the trick. normally i set it as $config->usePoweredBy = false; now i change it to null and it all works. don't you think it has to be fixed ?
    1 point
  33. We have a team of keeners - I think that you @szabesz are definitely one of us now too
    1 point
  34. Wow! thank you so much! I am really loving Processwire and just as I have experienced the community support is obviously amazing. I don't think it was even 5 minutes before I got a reply. Thank you again @adrian!!!
    1 point
  35. Hi @flyrs88 - welcome to PW and the forums! What you are looking for is: "include=hidden" You can also use "include=all" to find hidden and unpublished pages. Enjoy your PW journey!
    1 point
  36. How do you disabled it? Please can you try setting it to NULL, and not false? If this will work, I think it is a glitch here in Line 142 in ProcessPageView.module: if($config->usePoweredBy !== null) header('X-Powered-By:' . ($config->usePoweredBy ? ' ProcessWire CMS' : '')); See: !== null, if you have set it to false, it will result in boolean true, but afterwards, querying simply $config->usePoweredBy results in boolean false, what populates an empty string to the sended header.
    1 point
  37. As a possible alternative, take a look at using PHP's flock() call with the LOCK_EX flag (either in blocking or non-blocking mode.) I've done that before - it's portable - and it works well. Take a look at the examples and comments on that page, you might spot something that fits your needs.
    1 point
  38. That did the trick - i was adding it as a page in the admin instead of simply creating a new Role() and using the above $role->addPermission("permissionName");
    1 point
  39. I am probably the wrong person to answer ML questions, since I only just started using it myself, but you mention: Remember that to get /fr/about/ etc you need to set the name for the site's homepage in French to be "fr". The /fr/ in the url is not based on anything set under Setup > Languages.
    1 point
  40. $newrole = new Role(); $newrole->name= $userrole; $newrole->save();
    1 point
  41. I would be happy if it weren't me - you know, steroids side effects
    1 point
  42. Hi @Juergen - I think what you have come across is a POST size limit on the validator.nu site. You can confirm this by entering: bd(static::$pageHtml,'pageHTML', array('maxLength' => 1000000)); as the last line of this function: https://github.com/adrianbj/TracyDebugger/blob/master/TracyDebugger.module#L784 You may need the Dumps Recorder - I didn't check if the standard dumps panel retains this dump. If you then copy and paste this into: https://validator.nu/ using the "Text Field" option. You'll likely get a "bad gateway" error. If so, then that is the issue, although I am not sure what to do about it at the moment - I don't know whether they recently changed that limit (I have asked here: https://github.com/validator/validator/issues/371) - I am also seeing it here depending on the size of DOM of my page - horst's ALIF module puts it over the limit for me. As for the tracy-debug divs being shown when clicking the link, that is confusing and a little concerning as it looks like the validator is getting access to the Tracy debug bar, which is shouldn't have. Any chance you could let me know the URL of the site (PM if you want) so I can take a look at that?
    1 point
  43. Just for the record: It is also possible to test selectors easily with @adrian's Tracy Debugger module, e.g.: https://processwire.com/blog/posts/introducing-tracy-debugger/#console-panel and https://processwire.com/blog/posts/introducing-tracy-debugger/#want-a-quick-way-to-see-the-results-of-a-pw-selector
    1 point
  44. There are still some unsolved issues when installing (or maybe it's exporting?) a module which has required or requiredby dependencies. To be honest it's been a while since I looked at this. I would like to revisit it because it has the potential to be a huge timesaver. I am also thinking of implementing this functionality (https://processwire.com/talk/topic/14117-module-settings-import-export/) into it. If I can make some time for it, I'll see what I can do about sorting out these issues and getting it published.
    1 point
  45. Hello Fellow PW fans. I have since i started using PW allways been a bit afraid to use the API:s more advanced functions. Like creating pages or subpages on the fly in my PHP code in the page template file. So i read alot and finaly got a Eureka the other day. And have now tinkered around a bit and this simple example is the result. It´s just the bare basics. You could make this more advanced in infinity. I wanted to put this example somewhere for the future because i don´t think there is such a clean to the point example anywhere on the forums. All the others are deep within discussion threads with advanced stuff that are not of concern for people who looking for a simple example to start from. Notes: You should log in as admin before trying to run this code in your page template. I put the parent page i use in my testing as unpuplished for security. As allways, the API reference: https://processwire.com/api/ref/ is allways great to have when tinkering with the API. Any ways, here it comes, and you have to change paths and such to your requirements. <?PHP /* some random strings and stuff for testing */ $randTitle = 'test_' . mt_rand(0, 1000000); $randHash = 'test_' . md5(mt_rand(0, 100000) + time()); /* Example: Creating a new sub page to a parent page via API Author: EyeDentify This example do not check if the page name allready exist it just tries to save it no mather what. so you have to create that check your self. */ /* get parent page object to add sub page object to */ $addParent = $pages->get('/api-test-start/'); /* Instantiate a new page object */ $newPage = new Page(); /* turn output formating of for property manipulation */ $newPage->of(false); /* set the page objects parent so it is saved in the right place */ $newPage->parent = $addParent; /* set the name of the template to be used wich we uploaded before hand. */ $newPage->template = 'tmp_api_test_post'; /* sanitize and set page name and also used in the path */ $newPage->setName($sanitizer->pageNameUTF8($randTitle)); /* the title */ $newPage->title = $sanitizer->text($randTitle); /* set custom fields propertys, the ones we created ourselfs */ $newPage->api_test_hash = $randHash; /* save the page object to database as child of the given parent */ $newPage->save(); /* turn on output formatting again, importent because it should be ON when outputting it in template files later on. */ $newPage->of(true); ?> This is kind of a example and code template in one. I hope this can get others started that are beginners like myself to get more advanced with the PW API. I expect there is propably things that should be done a certain way but this is my way. Good luck with your API adventures. Update created a gist for the github users of the PW community of this example. https://gist.github.com/magnusbonnevier/4dbb3a28634a9b76bbf5855dd871606f
    1 point
  46. Hey guys No problems now... Just sharing to the collective knowledge pool should someone do a search... My site was unencrypted http and I was using Zoho Mail with no problems. Here is what I set things to and all was ok: Outgoing Server Name: smtp.zoho.com Port: 587 & Use START_TLS The problem came when I decided to switch the site over to a https site. And once I did that I was not getting any emails sent. Using "Test settings now" showed that I had some authorisation issues. After much experimentation, the issue turned out to be that SMTP user and Sender emailaddress have to be the same value. Previously they were different email address values and worked just fine when the site was http over TLS. And so by making sure that SMTP user and Sender emailaddress are identical, setting the Port to 465, using SSL, and allowing self signed certificates, all is good again when sending via WireMail SMTP and Zoho Mail. At least for me! Hope that saves someone 15 to 30 mins Have a great week everyone, especially all the Mods! Oh and P.S. Thanks horst for this great module!
    1 point
  47. Hi Kai, I don't see any requirements here that is not manageable by ProcessWire, the only limit will be knowledge of PHP. 1. You could implement OAuth easily with 3rd party libraries or integrate each provider's API into ProcessWire. 2. You can manage users by using API and/or by playing with roles, permissions into ProcessWire backend. 3. Yes - very easy, for example, you can just use "pages" and page filedtype for relations. 4. Yes - by playing with urlSegments. 5. Yes - you can implement this feature easily + there are one or two modules which might help you to achieve that. 6. Yes - you have to implement it. 7. Yes - by using the API . 1. Yes 2. Yes 1. Yes (hooks come to my mind). 2. No problem at all. 3. From what I've read on the forum, I want to say : superfast. (ProCache)
    1 point
  48. @jacmaes: many thanks for your feedback! I have updated the script in my post with your suggestion to work only with the image->name and not image->filename within str_replace(). Also I added a line at the end of the pages loop to uncache each no longer needed page, to save some memory.
    1 point
  49. Am back in play. I am working on the frontend module.
    1 point
×
×
  • Create New...