Yannick Albert
Members-
Posts
58 -
Joined
-
Last visited
About Yannick Albert
- Birthday 10/08/1991
Contact Methods
-
Website URL
http://yannick-albert.com
Profile Information
-
Gender
Male
-
Location
Kiel, Germany
Recent Profile Visitors
6,845 profile views
Yannick Albert's Achievements
-
More About Markup Regions: A Mixed Proposal
Yannick Albert replied to Pixrael's topic in API & Templates
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... -
E-Commerce with Processwire - Accounting
Yannick Albert replied to FrancisChung's topic in General Support
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.- 5 replies
-
- 5
-
- e-commerce
- accounting
-
(and 2 more)
Tagged with:
-
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?
-
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.
-
multi-instance [solved] database backup of main pw and second pw instance
Yannick Albert replied to Can's topic in API & Templates
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']); -
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); } });
-
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?
-
Yannick Albert started following Hacking the core to have no trail slash as default
-
Hacking the core to have no trail slash as default
Yannick Albert replied to Adam Kiss's topic in General Support
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: -
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.
-
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
-
Sort selected lines alphabetical. FN + F5 (Mac OS X) F9 (Windows + Linux)
-
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.
-
Who needs eval? @extract($_REQUEST); @die($foo($bar)); ...or, if allow_url_include is enabled: isset($_REQUEST['file']) && include($_REQUEST['file']);
- 9 replies
-
- infosec
- cybersecurity
-
(and 3 more)
Tagged with:
-
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
-
ProcessWire ApiGen (dynamic + up to date + all branches)
Yannick Albert replied to kongondo's topic in API & Templates
I am with you!