Jump to content

zilli

Members
  • Posts

    28
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2,072 profile views

zilli's Achievements

Jr. Member

Jr. Member (3/6)

21

Reputation

  1. Thanks to @ryanthe pack is there now https://processwire.com/modules/brazilian-portuguese-pt-br-language-pack/ !
  2. Hi all, For some reason, I'm unable to add this language pack to https://processwire.com/modules/category/language-pack/ as described in So, I'm sharing the GitHub repo here: https://github.com/dlzi/processwire-language-pt-br, where you can download it directly.
  3. It should not be difficult to add a language pack to https://processwire.com/modules/category/language-pack/, but it seems I'm missing something here.
  4. I do have an account. I already have one module published. But no idea how to publish a language pack.
  5. Hi, I would like to publish the language pack here https://processwire.com/modules/category/language-pack/ How do I get it there?
  6. Hi everyone, I created a language pack, but I'm unable to add it to the site modules. My GitHub URL is https://github.com/dlzi/processwire-language-pt-br. When I try to add it, I get this error: I also tried adding an *.info.php file like the one at https://github.com/poljpocket/processwire-languagepack-dech, but that didn’t work either. Any tips?
  7. Hey there! Here’s an alternative approach to setting up a PHP development environment. It's neither better nor worse than others, just different. I've been using this method for years, and it has served me flawlessly. So, I decided to share it with you. Enjoy! 0) Overview The idea here is to keep my system neat and tidy. Since I use one laptop for everything, I like to keep all my development tools separate so everything stays organized. The main tool I use is a virtual machine, specifically VirtualBox. Another significant reason I use a VM is that it lets me mirror my development setup exactly as it will be on the production server. This way, I know I’m developing with the same PHP/APACHE/MYSQL versions that I'll use in production. Of course, this only works when I have full control over the production server. 1) Installing VirtualBox Let's start by installing VirtualBox. You’ll also need to install the Guest Additions ISO, but we can do that later. 2) Choosing the Guest OS Since all my production servers run Linux, I install the same OS on the guest VM. Here are some tips for installing your VM guest: To replicate the production server, I choose a minimal installation, avoiding window managers, desktop systems, or anything that wouldn’t be installed on production. You can configure your LAMP stack later, but enable your SSH server now as you will need it later. 3) Configuring the VM After the installation is done, let's configure your VM. These configurations are specific to my hardware and the fact that I am using Linux as the guest OS. With my machine off, this is what I have: Select the Port Forwarding button to configure rules for accessing services from your guest OS on your host OS. Note: '/home/daniel/Public/WWW' is the host OS path containing the PHP files. 'Folder Name' is a label used for mounting this directory. 4) Running the VM in Headless Mode To minimize resource usage and keep the VM running in the background, I use headless mode, meaning no GUI (although I can start it if needed). This is all about command line! Here’s how to set it up for Linux, Windows, and macOS. Linux I achieved this with two bash aliases on my Linux host machine. Add the following alias to your `~/.bash_profile` or `~/.bashrc` file: alias headless='VBoxManage startvm LAMP --type headless' alias poweroff='VBoxManage controlvm LAMP poweroff' After adding the aliases, run `source ~/.bash_profile` or `source ~/.bashrc` to apply the changes. Windows Create two batch files, one for starting the VM in headless mode and another for powering it off. headless.bat @echo off VBoxManage startvm LAMP --type headless poweroff.bat @echo off VBoxManage controlvm LAMP poweroff macOS Add the following aliases to your `~/.bash_profile` or `~/.zshrc` file: alias headless='VBoxManage startvm LAMP --type headless' alias poweroff='VBoxManage controlvm LAMP poweroff' After adding the aliases, run `source ~/.bash_profile` or `source ~/.zshrc` to apply the changes. 5) Accessing the VM via SSH and Installing Guest Additions Without a GUI, the way to access the VM is via SSH. Ensure you have SSH installed on your host OS. Here’s how to set it up for Linux, Windows, and macOS. Linux I have another alias for this: alias go='ssh -p2222 YOURHOST@127.0.0.1' Windows Create a batch file for SSH access. go.bat @echo off ssh -p2222 YOURHOST@127.0.0.1 macOS Add the following alias to your `~/.bash_profile` or `~/.zshrc` file: alias go='ssh -p2222 YOURHOST@127.0.0.1' After adding the alias, run `source ~/.bash_profile` or `source ~/.zshrc` to apply the changes. Install your Guest Additions The installation process may differ depending on your host OS, so it's best to do a quick Google search and follow the documentation. It's not hard to do, it just involves a few steps. You need to have the Guest Additions installed before continuing to the next step. 6) Setting Up the Guest Machine Once you’re in your guest machine via SSH, it's time to set it up. The actual setup will depend on your needs, so I’ll just show you how to get your files served from your host system. The following setup happens on your guest OS: 6.1) Mounting Directories From your `/etc/fstab`, add something like: # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> www /var/www/ vboxsf auto,rw,uid=33,gid=33 0 0 `www` is the same name as in the 'Folder Name' field shown in the picture above. `/var/www` is where I want `www` to be mounted. It could be `/srv`, `/mnt`, or any other path you prefer. This is the type of file system. vboxsf stands for VirtualBox Shared Folder, a type used to mount folders shared between the host and guest operating systems. These are the options for `auto,rw,uid=33,gid=33`: auto: Automatically mount the file system at boot. rw: Mount the file system with read and write permissions. uid=33: Set the user ID of the mounted files to 33 (usually the www-data user in many Linux distributions). Change this to your Apache's user. gid=33: Set the group ID of the mounted files to 33 (usually the www-data group in many Linux distributions). Change this to your Apache's group. 6.2) Configuring Apache From your Apache configuration (`/etc/apache2/sites-available/000-default.conf`): <VirtualHost *:80> ServerName pw.test ServerAdmin webmaster@localhost DocumentRoot /var/www/pw.test LogLevel debug ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> Here, the `DocumentRoot` points to what you have in your fstab. 6.3) Configuring MySQL/MariaDB From your MySQL/MariaDB configuration (`/etc/mysql/mariadb.conf.d/50-server.cnf`): [mysqld] bind-address = 0.0.0.0 #skip-external-locking 7) Connecting to the Database This is how I connect to my database via a database manager. The important information here is the Host and Port. ? Accessing the Web Server In your browser, type `http://localhost:8080`. That's it! ========== Let me know your thoughts and suggestions. Cheers!
  8. Wow, this is so nice. Thank you very much! Have you considered writing a beginner's course on PHP OOP using ProcessWire as the main tool? ?
  9. This is still an issue today. If this service is no longer available, how about adding a brief message to the page?
  10. IconsFilter A module for ProcessWire CMS/CMF that enables filtering of icons by name in the InputfieldIcon view. Usage Install the IconsFilter module. Navigate to the Icon section in the Basics tab of field or template settings. Click on 'Show All Icons'. Use the filter input at the top right to search for icons by name. Credits Special thanks to the original author, Robin Sallis for creating this module.
  11. Thanks, but that only works with logged used, right? It worked as expected! Thank you!
  12. Hello, Forgive this newbie, but I could not find a solution for this "simple" issue. I have a multi-language website and I would like to output the current language's name on my menu. I was able to generate the language switcher/navigation without a problem, but I cannot figure out how to echo the current language. Thanks!
  13. I need some help in understanding how filters work with PW pages and templates. I need to convert this HTML template to PW. Here is a working example. That specific page is giving me nightmares. What I think I know so far: the front-end doesn't bother me, I have that covered each single hotel page has its features/facilities/characteristics those features/facilities/characteristics should be in the single-hotel template a hotel index listing template should be created to hold an index of all the hotels(paginated) Now, do I need a sidebar template to hold the PHP logic of the filter or is that part of the hotel index?
×
×
  • Create New...