Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/15/2017 in all areas

  1. hey guys..just stumbled upon this and i think it might be interesting, at least worth a read ;-) https://medium.freecodecamp.com/how-to-build-cross-platform-mobile-apps-using-nothing-more-than-a-json-markup-f493abec1873#.az40aujdt
    6 points
  2. Here is a pre-release version on Github: https://github.com/outflux3/ImportExternalImages Still needs some cleaning up, but works fine so far in limited testing on 3 sites...
    3 points
  3. Surely you would trust .... Processflier?
    3 points
  4. I believe @LostKobrakai had something about this here: $field->collapsed = Inputfield::collapsedNever; However, someone please correct me if I am wrong.
    2 points
  5. But at least Tracy would give you a chance to debug and test your code changes on-the-fly and maybe save yourself from becoming a dead bugger! PS - I am not sure how well "bugger" translates to those here from non English colonies For those looking for this, this is the definition you want: http://www.urbandictionary.com/define.php?term=bugger&defid=1454790 and definitely not this one: http://www.urbandictionary.com/define.php?term=bugger&defid=734856
    2 points
  6. I guess writing comment is much more enjoyable in the forums, but not in the code) For now I settled on this syntax for non-phpdoc multiline comments. Without any particular rules on where to write them. /* * Comments here. */
    2 points
  7. on a local test I added a fake module in the root of the modules directory hirarchy and changed the dependencies hirarchy to make it the main module that installs the three others: /site/modules/CroppableImage3/ /site/modules/CroppableImage3/CroppableImage3.module ** /site/modules/CroppableImage3/FieldtypeCroppableImage3/FieldtypeCroppableImage3.module /site/modules/CroppableImage3/InputfieldCroppableImage3/InputfieldCroppableImage3.module /site/modules/CroppableImage3/ProcessCroppableImage3/ProcessCroppableImage3.module ** @adrian: This way it get recognized by the upgrade module. It seems, it has nothing to do with the version is a number or a string.
    2 points
  8. I don't experience any issue with this when the ProcessWire namespace is not declared - the file compiler seems to be smart enough not to wrongly insert \ProcessWire\ before the PDO class. If the ProcessWire namespace is manually declared then you would need the backslash, \PDO::FETCH_COLUMN. I guess it wouldn't hurt to include the backslash in either case. The code was missing an arsort() - I have updated it now.
    2 points
  9. Try this: https://github.com/processwire/processwire-issues/issues/28#issuecomment-252870084
    2 points
  10. Probably an update of MySQL to 5.6. Disable STRICT_TRANS_TABLE and the message should disappear.
    2 points
  11. Hello everyone, I've been fiddling around a lot lately with docker containers for my local development on a linux machine. Tried many different options, also readily available processwire images and tutorials from the forum. But never got it right. Mainly because of permission issues with docker volumes. That is a tricky part on linux machines whereas on OSX it doesn't seem to be an issue. Then I discovered http://www.wordpressdocker.com/. And the setup with nginx as a proxy that routes requests to separate containers with the actual site install appealed to me. The whole thing sits on top of alpine linux containers which are really lightweight. So I decided to give it a try. And, first time since experimenting with docker, I got a running PW install. Rewriting was not working until I adjusted the nginx config. Now I have a fairly complex PW site running in a container. Everything is working, image upload/editing etc. So I'm really exited, especially since the dev site is now blazing fast compared to my old vagrant virtualbox vm setup. Honestly, I don't really understand everything that is happening behind the scene. But I managed to adjust the original files and build a new image that works with PW and doesn't have all the WP stuff. The nginx config I took from https://github.com/elasticweb/nginx-configs/blob/master/configs/processwire-2.conf Not sure if it covers everything for PW3 as well. I would very much appreciate if someone who is more in the know than me could take a look. All files for building the docker image are here https://github.com/gebeer/alpine-php-processwire A working image here: https://hub.docker.com/r/gebeer/alpine-php-processwire/ Documentation is kind of lacking. I took over quite a lot from the original project. But following the github README and the original documentation should get people started who have a little experience with docker already. If someone needs a more in depth step by step tutorial for setting things up, let me know and I'll put something together.
    1 point
  12. This week we’ve started developing a new admin theme for ProcessWire that aims to be a community collaboration. We’ve now got some good momentum with lots to share in this post. We also get into some technical details and have screenshots as well. https://processwire.com/blog/posts/working-towards-a-new-admin-theme/
    1 point
  13. This test just confirms that your .htaccess in picked up and parsed by apache, so the real problem still has to be in your original .htacces. The mistery for me is how it could work on friday and then suddenly cease to work on monday. Maybe you could post your .htacces file (zipped)? What PW version are you running?
    1 point
  14. @PWaddict Thanks for the input. I made the module configurable with the option you mentioned. Furthermore I did some repairings for some special cases. Seems to work. Please try Version 2.0.2
    1 point
  15. Absolutely - you will need to forward this onto your hosting provider so that they can remove this restriction.
    1 point
  16. Hi @ali.donde - welcome to the forums. Sorry, I am in a rush right now, but to help more we will need to know the ajax error. If you click on the Network tab of you dev console and then the Response - have this open before you upload the image and tell us what you get. I expect it's a php Warning, hence the "W"
    1 point
  17. Thanks! That was a silly mistake, interestingly noone spotted it, including me v125 is uploaded with the fix.
    1 point
  18. that does indeed fix the issue - thanks!!
    1 point
  19. As long as Tracy Deadbugger is not installed. Or any of my modules.
    1 point
  20. Thanks to @gmclelland, we have a fixed PW3 branch (now at v3.0.2) and some extended documentation for the tile layer support option in both branches.
    1 point
  21. Do you really need to generate menus in the text area? Why not in the pages' template files?
    1 point
  22. There is this: <div> <?= $page->product_description ?: 'No description is available for this product.' ?> </div>
    1 point
  23. It is, but it's not adviced to do so, because of the security risks involved. E.g. Ryan did recently move the php code for page fields out of the backend and replaced it with telling people to use hooks. But to run arbitrary php code look at eval().
    1 point
  24. Spot on, thank you. In my case it was ONLY_FULL_GROUP_BY that caused the problem This helped solving it:
    1 point
  25. @LostKobrakai That did the trick. Site is back to normal now. Thanks a lot!
    1 point
  26. I guess we need to do some testing, with regards to the version number issue? not sure how to conveniently test it though, but could have a look at the upgrades module and try and see why it doesn't even list the CroppableImage3 module...
    1 point
  27. Also you might skip the closing ?> if it's at the end of the file to keep trailing whitespace issues away.
    1 point
  28. @Macrura thanks, I can confirm that I no longer have the issue after downloading the module from Github manually.
    1 point
  29. in the meantime i can see from some quick testing that the getCrop method is getting stuck here: // return InputfieldCroppableImage3 or null if not found $inputFieldInstance = $this->_getInputFieldInstance($event);
    1 point
  30. Sounds like a namespace issue because bootstrapped files don't get run through the file compiler you will either need to add namespace ProcessWire; to the top of the file, or do: $page = new \ProcessWire\Page(); to reference the ProcessWire namespace
    1 point
  31. Hey Kongondo, I think 3rd-party admin themes will be even easier than before. What I meant was that since Reno is kind of a core theme, it doesn't make sense to develop it separately *if* — and it's still a giant *if*— the new default theme allows you to configure a setup that is basically the same as the current Reno theme. We are deeply invested in the Reno theme here, so either the new admin will be customizable to something very similar, or I'll keep developing Reno as separate theme. I have some things I'd like to implement that UIKit will make easier, and I'm excited to dive in once Ryan has a stable base theme to work from.
    1 point
  32. I'll be reworking the Reno Admin theme to take advantage of UIKit and all the refactoring Ryan is doing.
    1 point
  33. <? ?> is removed in php 7.0 is only available with short_tags enabled in php, which it isn't by default, use <?= ?>, which are always available. See here: http://php.net/manual/de/language.basic-syntax.phptags.php
    1 point
  34. Not consciously... ;-| Could bad syntax in a template really bring down the entire front-end? I have this in my home page template: <div class=left><? echo "<p>{$page->body}</p>" ?></div> That is wrong on many levels... Not sure how that got there.
    1 point
  35. Exactly what I was going to write, but you were quicker. I think we should put an emphasis on accessibility when creating this new admin theme. Not just only color contrast but also regarding keyboard-only usage and usage with assistive technologies like screen readers. Creators of WordPress and Drupal already aim for ATAG (Authoring Tool Accessibility Guidelines) compliance, e.g. here and here and ProcessWire should do so as well Although I'm no professional in this topic I'd love to help with audits and Pull Requests.
    1 point
  36. Having a proper front-end framework power our.. umm, back end.. is a great idea. While keeping dependencies as low as possible makes sense and has, in my opinion, proved out to be a great strategy so far, this is one of those cases where an outside component just plain makes sense. My hope is that this will also simplify the workflow for module authors trying to match the look and feel of existing admin theme(s). Currently you basically have to target a certain admin theme, and even then you'll probably end up inventing a few UI features / components of your own. Not a very good situation for providing a consistent experience for end users Have to agree with @Robin S. I enjoy simplicity as much as the next guy, but the default tab component in Uikit is just plain bad in terms of both usability and accessibility. Another thing that slightly bugs me in current design (which we probably shouldn't be commenting on, considering that it's obviously not the final one) is the low contrast: that's a really common mistake in terms of accessibility, but luckily it's also really easy to fix.
    1 point
  37. Looks very clean and sleek. I'm a little concerned the default UIkit styling of some components takes the minimalist aesthetic a bit too far. There's a point where the visual metaphor breaks down and usability suffers. Take the 'tabs' component... In the first screenshot it is much more obvious: that it will respond as a tabbed interface as opposed to some other type of navigation which tab is active which parts of the page are contained within the area the tab navigation controls (e.g. you can see that the "Save" button is outside the tabbed area). Edit: I realise that UIkit will only provide the foundation styling for the admin and will be customised for use there. So this is more just an observation about the decisions made by the UIkit designers rather than something that will be a problem for the finished PW admin theme.
    1 point
  38. Module: http://modules.processwire.com/modules/ajax-intercooler-js/ Repo: https://bitbucket.org/pwFoo/ajaxintercoolerjs AjaxIntercoolerJS module features integrates IntercoolerJS async CCS ("loadCSS") and JavaScript load / update optional disable async css / js handling for blocks, sidebar, ... Intercooler X-IC response header support support / hook $session->redirect multiple X-IC-Trigger handling multiple X-IC-Script handling Usage Basics It's a autoload module, but you need to enable it inside of your templates, because scripts and dependencies ("JqueryCore") have to be loaded too. You can enable / load it global inside of the TemplateFileHelper controller "_layout.php" $ic->enable(); Some changes are needed to your main template "_layout.tpl". <!-- IntercoolerJS needs a target with ID "pageContent" for (async) page content --> <div id="pageContent"><?=$pageContent?></div> And your navigation links need some IntercoolerJS attributes like that. <a href="..." ic-get-from='/url-to-load' ic-target='#sidebar'>...</a> Your just use and hook MarkupSimpleNavigation. $nav = $modules->get('MarkupSimpleNavigation'); $opts = array( 'show_root' => true, 'item_tpl' => "<a href='{url}' ic-get-from='{url}' ic-target='#pageContent' ic-push-url=true>{title}</a>", 'item_current_tpl' => "<a href='{url}' ic-get-from='{url}' ic-target='#pageContent' ic-push-url=true>{title}</a>", ); // optional modify a specific link to use another target. For example "#sidebar" $nav->addHookAfter('getTagsString', null, function($event) { $link = $event->arguments[1]; if ($link->title == 'sidebar') { $event->return = "<a href='{$link->url}' ic-get-from='{$link->url}' ic-target='#sidebar'>{$link->title} (sidebar)</a>"; } }); // render and set as _layout.tpl template var $layout->set('navigation', $nav->render($opts)); Disable CSS refresh (remove "current" styles and load the new one) The current loaded page css shouldn't removed if the sidebar is updated. So it's possible to disable the asyncHandler inside of the "sidebar" template. $ic->asyncHandler(false); Quick and dirty FrontendUser integration You just need a PW template file like that. $fu = $modules->get('FrontendUser'); $fu->login(); $button = $fu->form->fhSubmitBtn; $button->attr('ic-post-to', $page->url); $button->attr('ic-target', '#pageContent'); if (!empty($_GET['logout'])) { $fu->logout($page->url); } // Workaround until IntercoolerJS 1.0.1 release if ($input->post['ic-trigger-name']) { $input->post[$fu->form->fhSubmitBtn->name] = $input->post['ic-trigger-name']; } $processed = $fu->process($page->url); if ($processed && !$user->isGuest()) { // $processed == false if login failed (not submitted / login successful == true) echo "Hello $user->name!"; echo "<a href='$page->url?logout=1'>Logout</a>"; } else { echo $fu->render(); } X-IC Response Headers /** * Set x-ic-trigger response header * @param array $array One or more events with related data arrays */ public function trigger($array) { $json = json_encode($array); header('x-ic-trigger: ' . $json); } /** * Set x-ic-script response header * @param string $js Valid javaScript code */ public function script($js) { header('X-IC-Script: ' . $js); } /** * Stop current / parent element Intercooler polling */ public function cancelPolling() { header ('x-ic-cancelPolling: true'); } /** * Resume current / parent element Intercooler polling */ public function resumePolling() { header ('x-ic-resumePolling: true'); } /** * Set current / parent element Intercooler polling interval * @param string $interval */ public function setPollInterval($interval) { header ('x-ic-setPollInterval: ' . $interval); } /** * Set x-ic-refresh response header * @param string $pathCsv Comma separated paths to refresh. */ public function refresh($pathCsv) { header('x-ic-refresh: ' . $pathCsv); } /** * Set x-ic-open response header * @param string $url New window / tab address */ public function open($url) { header('x-ic-open: ' . $url); } /** * Set x-ic-redirect response header * @param string $url Redirect destination address */ public function redirect($url) { header('x-ic-redirect: ' .$url); } Wrapper for X-IC-Trigger Add a event trigger with event name ($event) and parameters array ($array). "addTrigger()" method is a wrapper for usage with multiple event triggers. Native method for a single execution is method "trigger()" $ic->addTrigger($event, $array); Wrapper for X-IC-Script String of javascript code for client side execution. "addScript()" method is a wrapper for multiple usage of "script()" method. $ic->addScript($javascript); $session->redirect is hooked! The module hooks $session->redirect() method for ajax calls. It's needed to execute redirects by IntercoolerJS X-IC-Redirect for ajax calls. Used for the FrontendUser integration.
    1 point
  39. Just tried this and it works: <img <?php echo $page->portfolio_images->first()->getCrop('portfolio-item')->srcset('portfolio-item'); ?> class="lazyload" alt=""> This was the first time I added CroppableImage to a project and it seems great. Some UI facelift here and there could be beneficial though
    1 point
  40. Or use my migrations module, to kinda get the best of both worlds. The ease of the ProcessWire API with the ability to have migrations run/downgraded as needed.
    1 point
  41. Perhaps working solo and on only one machine would be ok for not committing database versions, but working with multiple devs would make db updates a nightmare if they weren't committed to a repo. Working from a single remote database is painfully slow, and as soon as you have no internet, your work stops there and then. At Fixate we've always versioned our db's for ProcessWire sites. Adding db exports to a repo is not ideal, but in terms of pragmatic workflow it's the fastest way to keep a project moving efficiently. The alternative would require a manifest or generator that would check if the correct fields are present on a database, and programmatically insert them (like Rails migrations). This would be the best way to go, as you're versioning your schema, as opposed to your data, but in terms of flexibility of what your admin looks like, you're going to have to manage enormous schemas for each template and field if you're to ensure the best UX in the admin for your clients. We've automated MySQL exports and imports with Gulp: https://github.com/fixate/generator-fixate-pw/blob/master/app/templates/gulp/tasks/mysql.js
    1 point
  42. 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
  43. Hi @kixe - glad you're finding it useful. I have just added Exclude/Include switch that you suggested. The default is exclude to ensure backwards compatibility for those upgrading and not checking anything new in the settings. Thanks for the suggestion and please let me know if you have any problems. Also, I have now made the module always ignore the homepage - before I recommended users exclude it on multilanguage sites, but I couldn't think of any reason why it would be needed on any site, so I think this is simpler and cleaner.
    1 point
  44. @Juergen, obviously I missed your post half a year New Edition But finally I found it and redesigned the template file I provided in post 88 of another thread It is working now properly according to the google guidelines. It comes with 301 redirect to the path version that lacks the language segment which works in PW 3.0 up but not in 2.7. In this case you need to uncomment the code line which forces the redirect. Template detects if the translation is checked 'active'. Furthermore you can easily adjust selectors for the page array where the pathes are taken from. Feel free to try and use it. multilang-sitemap-xml.php.zip
    1 point
×
×
  • Create New...