Jump to content

dragan

Members
  • Posts

    2,007
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. Why is that? Surely, if you change the name in the module, next time you refresh modules, the name of the page in admin/setup/ will also change?
  2. I only ever use BS or Foundation just for the grid, mixins and helper / utility classes (.visuallyhidden et al) + normalize (S)CSS. There's nothing wrong with it, and I don't understand people who claim that "every site built with BS looks the same" (or that is has to). It's just a tool. It doesn't dictate anything. As for components, I'm cherry-picking and choose the "best in class" (e.g. PhotoSwipe for lightboxes, Flying Focus) or build my own. An accordion or tab component is a trivial thing to build, and at some point (if you have a very custom design) it's easier than tweaking an existing solution. But of course - it all depends... on budget, deadlines etc.
  3. Admin on Steroids has an option where you can map CTRL + S to the save function. That way you don't even have to care about the button's position (but might be a bit overkill if you only need this module for only this feature).
  4. @Macrura Did you create a template (without file) according to Ryan's "how to" (step 3) ? Perhaps you have to only replace _ with - in your template name. From what I gathered, it should be a - character, not _.
  5. @Macrura Are you doing a search of some sort? i.e. using a selector? A field name like author_images_randomgibberishstring sure looks strange. Did you name it like that? In "regular" image fields I found the new feature works just fine, also with multi-language. Maybe you are using an image field inside repeaters?
  6. Do you check as logged-in superuser or guest (e.g. incognito mode)?
  7. @matjazp Perhaps you should take a look at Markup Cache or Wire Cache instead. They're powerful tools, and often overlooked.
  8. @Tom. You should bookmark the custom search in my sig (or one of the various others that exist) - you'll find stuff much, much faster ?
  9. Maybe you need a recursive function? Take a look here in the PW profile: https://github.com/processwire/processwire/blob/dev/site-default/templates/_func.php#L76
  10. Just update site/config.php If you want to keep the same config.php locally and remote, add a simple if statement or switch/case if ($_SERVER['SERVER_NAME'] === 'dev.mysite.com') { $config->dbHost = 'foo.mysql.db.host.com'; $config->dbName = 'xxxxx'; $config->dbUser = 'xxxxx'; $config->dbPass = 'xxxxx'; $config->dbPort = '3306'; }
  11. Is ACE Tracy's console editor? If so, then ALT-GR works for me (Windows).
  12. @bernhard Thanks for the hints. I didn't notice I was uploading .otf files instead of .ttf - my 2nd facepalm moment yesterday... As to the other issue I mentioned: I found out it's not related to RockPDF at all. I got some really weird issues with render() / wireRenderFile() - but only when I ran my code inside Tracy console. In a regular template everything works as expected. The issue was with matrix repeaters that are called with $child->render('offer_matrix') inside the template, where I use field template files* - suddenly PW wouldn't find these anymore. * site/templates/fields/matrix.php site/templates/fields/matrix/body.php site/templates/fields/matrix/gallery.php site/templates/fields/matrix/slideshow.php etc.
  13. Maybe a directory traversal attack (to install backdoors or whatnot). I would immediately contact the hosting company, and also check for suspicious files. Lock down your forms, or any other potential areas that allow user-input.
  14. Another issue: If I use wireRenderFile(), I get this fatal error: This used to work just fine with the previous version (v.7x), and the assets/file/ folder definitely exists.
  15. Yeah... using inline SVGs works just fine... until you want to style fills or strokes via CSS. I have updated rockPDF just now, and noticed that there's something buggy with using custom fonts. I have the fonts both in site/templates/fonts/ as well as in site/assets/RockPDF/fonts/. I have now also placed them in site/modules/RockPdf/vendor/mpdf/mpdf/ttfonts, cleared modules cache, but the error persists. I've looked into the module code, and presumably somewhere here the paths are defined: public function init($options = []) { // make sure the assets folder exists $this->wire->files->mkdir($this->wire->config->paths->assets . $this->className . '/fonts', true); $this->settings($options); } public function settings($options = []) { // merge defaults $defaults = [ 'tempDir' => $this->wire->files->tempDir('RockPdf'), 'fontDir' => [ __DIR__ . '/vendor/mpdf/mpdf/ttfonts', $this->wire->config->paths->assets . $this->className . '/fonts', ], ]; $options = array_merge($defaults, $options); Any clues how to fix this?
  16. Sorry, didn't fully read your post (re: SVG) - pls ignore this post.
  17. This is not a question about PHP, but a matter of your frontend. You should look into the Cache API, indexedDB and service workers. What you probably want, it to build a progressive web app. https://github.com/pazguille/offline-first https://ponyfoo.com/articles/backgroundsync https://www.twilio.com/blog/2017/02/send-messages-when-youre-back-online-with-service-workers-and-background-sync.html https://github.com/pulseshift/lunch-pwa https://github.hubspot.com/offline/docs/welcome/
  18. @cosmicsafari Well, you could take a look at the BCE module... Did you look at server logs? Did you also try with a very small CSV file - maybe it's not the size of the files, or the time it takes to process everything, but some stumbling blocks in your code ? I would first try it with adding output formatting set to false, and then also use sanitizers (you can never trust user input), or at least trim(). I also noticed this line $p->name = $name.'('.$lat.','.$lng.')'; which doesn't look OK. PW page names can't have special characters like (). Use the page-name $sanitizer and get rid of the () (or any other non-allowed characters).
  19. yeah well... no matter what system you use, that's a bad idea. Tracy Debugger can wreak havoc if used by non-trusted users (terminal, Adminer, console etc.). But you don't want to remove and install it again each time you log in as legitimate superuser, do you?
  20. @hollyvalero I tried it as well (hook is also in site/ready.php), and everything works just fine. Just copy-and-pasted the hook, and used the list example, and adjusted the selector. It even works within a partial I load via include_once() and cache the output with MarkupCache ? Do you run an ancient PHP version, by any chance? See Ryan's note about PHP < 5.3 Also, did you find any hints with Tracy Debugger?
  21. @Marco Ro If you would draw a little sketch, and show exactly what you want to do, and how it's supposed to look like visually (it's still not clear to me from your description), maybe there is a way with CSS only. And perhaps also show what it looks out now, out of the box, for comparison. e.g. if all you want is to place the label on the left, and the input on the right, you could do it easily with flexbox: https://codepen.io/dragan1700/pen/JjdRYVE
  22. @Marco Ro Why do you want to change that? And what's the situation? Do you use PW's inputfield form to create forms in the frontend? Do you want to re-style the labels and/or input fields? Maybe there's a CSS solution? Or is this even something from FormBuilder?
×
×
  • Create New...