Jump to content

Yannick Albert

Members
  • Posts

    58
  • Joined

  • Last visited

Everything posted by Yannick Albert

  1. One has to parse those comments blocks out of the html, recursively, identify/skip real comments, follow inheritance tree, protect against vuln xss foo etc... The parsing is currently done in WireMarkupRegions.php which has a lot hardcoded and html specific stuff, so it's hard to wrap around. If you really want this syntax, you should stick with an existing template engine like twig or mustache and replace the template tags with your custom comment-tag. Also consider FileCompilerModule... I personally use plates...
  2. If you link to GitHub, please use the commit-id (instead of branch-names). Otherwise, future editions could make those links pointless. … … Example usage: Blog and Matrix modules. Protip: To get the SHAified url on GitHub, go to any file you want to link to (e.g. https://github.com/kongondo/Blog/blob/master/ProcessBlog.module) and press Y (without anything, just y) on your keyboard.
  3. After a quick research... Found this migration guide (PHP 7.0.x to PHP 7.1.x): http://php.net/manual/migration71.php Maybe this is somehow related to your issue: Implemented safe execution timeout handling, that prevents random crashes after "Maximum execution time exceeded" error. http://php.net/ChangeLog-7.php#7.1.0 Dumb question: Have you tried to restart nginx and double checked that it runs with the correct php-cgi/php-fpm and latest mariadb/mysql?
  4. Seems to me like a misconfiguration of either your php or nginx installation. I have some ProcessWire sites running on Apache (2.2, 2.4) and Nginx with PHP 7.1, without problems so far.
  5. Just found out that ProcessWire already handles the setWireAndDatabaseStuff in WireDatabasePDO::backups. So, instead of this: $backupPath = $config->paths->assets . 'backups/database/'; $backupMeta = new WireDatabaseBackup($backupPath); $backupMeta->setWire($meta); $backupMeta->setDatabase($meta->database); $backupMeta->setDatabaseConfig($meta->config); $backupMetaFile = $backupMeta->backup(['description' => 'saludos your Cron']); ...it could be just this: $backupMeta = $meta->database->backups(); $backupMetaFile = $backupMeta->backup(['description' => 'saludos your Cron']);
  6. I think this should work (not tested): # Load media files from production server if they don't exist locally # http://rzen.net/serve-missing-media-production-apache-nginx/ <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f [NC] RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) http://example.com/$1 [NC,P,L] </IfModule> ...if this doesn't work for you, try php: /** * Load media files from production server if they don't exist locally * * https://processwire.com/talk/topic/5550-local-development-and-remote-assets/?p=54385 * https://processwire.com/talk/topic/4127-can-assets-folder-be-moved-to-another-domainsubdomain/?p=50150 */ $wire->addHookAfter('Pagefile::url', function ($event) use($config) { $path = str_replace($config->urls->root, $config->paths->root, $event->return); if (!is_file($path)) { $event->return = str_replace($config->urls->root, 'http://example.com/', $event->return); } });
  7. Great overview, Benjamin! Have you any reference on this or could you explain why we should avoid wire(). What's the best way to go, using $this?
  8. Since 2.6.9 we can also take care of Page Numbers and URL Segments: foreach ($templates->find('name!=admin') as $t) { if ($t->allowPageNum != 0) $t->slashPageNum = 0; if ($t->urlSegments != 0) $t->slashUrlSegments = 0; if ($t->slashUrls != 0) $t->slashUrls = 0; $t->save(); } https://processwire.com/api/ref/template/#pw-methods-URLs In addition, we could also move the conditions into the selector:
  9. A bit more info about the used font, your OS and browser would helpful. Have you tried this http://lee.greens.io/blog/2014/01/13/windows-chrome/ or https://gist.github.com/dalethedeveloper/1846552? By the way, this forum is mostly related to ProcessWire. I would redirect you to stackoverflow.com, where millions of people try to solve problems like this one.
  10. Not as often as I should. Mostly to sort properties in css style blocks or arrays/objects. I follow googles styleguide https://google.github.io/styleguide/htmlcssguide.html#Declaration_Order
  11. Sort selected lines alphabetical. FN + F5 (Mac OS X) F9 (Windows + Linux)
  12. Yannick Albert

    Innobloom

    Performance is nice, could get better with HTTP/2, AJAX and "prebrowsing" (https://tools.pingdom.com/#!/co5Dx5/https://innobloom.com/) . A thing I don't like is the flash due image-swap. Also, some script prevents the 1-finger swipe-back behavior on OS X.
  13. Who needs eval? @extract($_REQUEST); @die($foo($bar)); ...or, if allow_url_include is enabled: isset($_REQUEST['file']) && include($_REQUEST['file']);
  14. Does someone know how to match a single image field in connection with showIf? To be a bit more specific, there's an image-field with "Maximum files allowed" set to "1" and a checkbox-field which should be only visible if image.count!=0. Both fields exist on the same page and aren't wrapped in a PageTable or Repeater (But in a Fieldset, does it matter?)... All I tried did not work: cover!='' cover.url!='' cover.count=1 cover.count>0 cover.count!=0 cover.filename!='' The fun-fact: InputfieldSelector could find all those pages containing empty image fields with the tested selectors above. Any ideas? BTW: PW 3.0.11
  15. Hey @Philipp, after trying to log in, I just get mail-domain.tld - Login failed. Double checked everything and noticed that the username mail doesn't contain a @ (instead of mail@domain.tld it ends up in mail-domain.tld). Any ideas? PS: Tested 2.7.3 dev and 2.7.0 latest with blank profile.
  16. Once an update was made, the version number gets visible again due the notification message
  17. Just missed it: http://www.webocton.de/ When I was on win os, I really liked it. However, it seems that it is not longer maintained, last release 2010-11-25...
  18. Currently just a wet dream. Actually the simpliest way is to rsync/rm/mv the core related files... I hope on a mind change by ryan
  19. Some best practices in the Docs or Tutorials section about keeping processwire installations version controlled, could be helpful. So, what's the best way to handle modules and templates. Submodules, subtrees or just one bloating site-repository. Also deployment, with git-hooks (or whatever to recommend), could be mentioned there. Any thoughts on this?
  20. Nope, performance is fine, for me (iPhone 5s iOS 9 Safari, iMac 27" OSX 10.10.4 Chrome, Safari & Firefox) I can reproduce it... Just open your developer tools, take a look at the generated source and follow the steps explained above. You will see something like this, I am sure
  21. Looks great so far, except some things... It seems that there's something wrong with the replacement part of your ajax implementation. Go to at least two different pages and browse back, the content gets appended (also the slider component). Another point is user experience. If you want to provide a good/native feel, cache the scroll offsets and restore them on popstate. So, jump to the position where the user was, before he browse the history (via back/forward-buttons, history menu or any other way). replaceState is a good tool for this... Jörn Zaefferer talked about those topics (de) and has made a repo therefor https://github.com/jzaefferer/pitfalls-examples.Also, some more/different typography elements would be nice too... Btw: I'm on my couch with iPhone iOS 9 - mobile safari
  22. This is also a nice tool for the great people here: http://billtheapp.com/ (also available in german)Doesn't do the accounting stuff, but invoices.
  23. Started with papierkram.de, switched later to debitoor.com and today my own pw solution.
×
×
  • Create New...