Jump to content

Sergio

Members
  • Posts

    534
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Sergio

  1. As far as I know, all translations are kept as json files on assets/files folder. I don't think they will be deleted if you uninstall the module. Give it a try but backup the json files first.
  2. Strange, I didn't have this problem after migrating from Mac to Windows (the other way around). But try uninstalling and installing the module again.
  3. Maybe you can create a textformatter to add the classes for you automatically after page save. Or, in your sass file, extend the .title class for all headers.
  4. You're right! I didn't know that.
  5. Instead of $pages->count you may prefer to use $pages->findOne, so you can search for pages hidden or unpublished. See: https://processwire.com/api/ref/pages/find-one/ So: <?php $firstname = $sanitizer->text($input->get->firstname); // firstname should be the name of the input field $lastname = $sanitizer->text($input->get->lastname); $fullname = $firstname . $lastname; $sitetocheck = strtolower($fullname); $p = $pages->findOne("name=$sitetocheck"); if ( $p->id ) { echo "Sorry, seems you 're already registered"; } else { $p = new Page(); $p->template = 'basic-page'; // set template $p->parent = wire('pages')->get('/about/'); // set the parent $p->name = '$fullname'; $p->title = '$fullname'; $p->save(); echo "Thanks for registration"; } ?>
  6. Maybe you can try http://modules.processwire.com/modules/auto-smush/ But I'm thinking about using Cloudinary for my next project: http://cloudinary.com/ One of the greatest features of their service is to auto detect and serve .webp files if the browser supports. This format has a better compression that jpg or png.
  7. Cool site, Ben! Seems it was very fun to work on it. The css / js file sizes are minimum which is very good, congrats! But I noticed that some images could be more compressed and save a lot of bandwidth on mobile, like clouds.png. I used https://tinypng.com/ to compress it and it went from 278kb to 91.1kb. Their tool also compresses JPGs. I reckon you didn't have the time to do it yet.
  8. @Soma wrote about his solution related to your problem, take a look:
  9. @ian has a site about moths, maybe he can help you.
  10. There's this thread:
  11. Yes if you expect the user to translate it by him/herself. But if it's your job, just wrap the string in code and translate it in the language settings page, loading the PHP file there. Although, I've found the use of a single file to handle all strings, like a _translations.php much easier. I just include it within my _init.php. I have one here with 225 phrases and counting.
  12. I'm curious, why didn't you use PW's translation capabilities, in this case, to avoid the code repetition?
  13. I think the textarea fields are configured as MediumText on the database, so you'll have to change that if your needs exceed its maximum length. Check this page for a reference (this is using InnoDB engine, BTW): https://dev.mysql.com/doc/refman/5.7/en/storage-requirements.html#data-types-storage-reqs-strings
  14. Try to print the entire $input array to show what's inside it: <?php print_r($input); ?> And have you tried the use of regex on the allow url segments field? regex:^category/[a-z]+$
  15. hahaha pretty expensive I guess.
  16. Hello to all female friends here at ProcessWire. I received today 3 tickets to tickets for Collision (Websummit) 2018 , but I can give them only to women, and I decided to post here first. Is there anyone interested? This is the message I got:
  17. My main 2011 15" Macbook Pro had serious graphic problems and stopped working couple weeks ago and I decided to build a Windows machine for the same reason. I also have a 13" that I use to travel. Here in Brazil, a Macbook Pro cost is outrageous, a powerful Mac setup can cost up to 3 or 4 months of salary of an experienced developer. A default 15" Macbook Pro costs here R$ 18.499,00 which converts to US$ 5,581.00!!! So, after 10 years of using only Macs, I built a PC that cost me about $1,700 and it's a beast of a machine for developing and video editing (and some games): Processor: Ryzen 7 1700 - Octa core, 3GHz RAM: 16GB 2133 MHz Motherboard: Gigabyte B350 Gaming 3 HD/SSD: 1 Kingston 250 GB SSD + 1 Western Digital 1TB 7200 rpm GPU: Asus Radeon RX 460 - 2GB RAM Monitor, keyboard, and mouse I already had. They cost about US$270 together. I installed Ubuntu through Windows WSL but I'm not using it like I thought I would. I installed Laragon and it works perfectly for running ProcessWire and other PHP projects. Windows 10 Pro is a very good OS, but I miss some good software like SequelPro and Transmit. The Windows equivalents are not as polished.
  18. You just need to add the Russian language pack to the admin and set the Russian language on each admin user profile. A language pack is a zip containing many files that will translate the admin pages, fields etc. Download the package: http://modules.processwire.com/modules/russian/ After that, go to /admin/setup/languages/, edit Russian and upload the file on the "Core Translation Files" section.
  19. Did you try the http://modules.processwire.com/modules/fieldtype-secure-file/ module?
  20. I think this is a job for Pro Field Repeater Matrix: https://processwire.com/api/modules/profields/repeater-matrix/
  21. I confirm that this version is working on Windows 10, using https://github.com/cretueusebiu/valet-windows If yours doesn't work, maybe enabling developer mode on Windows is required. Thanks @LostKobrakai !
  22. Good idea, but I think they are handpicking those, I don't see a submission form. Do you?
  23. You don't need to change anything in the database. The only change needed in this case is the httpHosts array: $config->httpHosts = array('testing.com'); in the config.php file.
  24. Oh yeah, it can be done such way. I used this approach to create a dark version in the past.
×
×
  • Create New...