Jump to content

spoetnik

Members
  • Content Count

    64
  • Joined

  • Last visited

Community Reputation

11 Good

About spoetnik

  • Rank
    Distinguished Member

Profile Information

  • Gender
    Male
  • Location
    Europe, the Netherlands

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Tracy Injects the 'Font Awesome 4.7.0' css into the frontend. This fucks up my layout, as I am using v 5.0.13 in my frontend. Is there an easy way to prevent tracy from injecting this css?
  2. Any Nginx guru out there that can translate those enhancements to a nginx-config?
  3. Thanks @LostKobrakai. Looked into the 'Dynamic Roles' Its looks like an abandoned module from Ryan, but the up-to-date fork from @matjazp works. I saw your comment, , and that's exactly the same problem I have with this module. I would love to use this module as a base, or write a pull-request to have this functionality, but I am not skilled enough to do that. The hook into 'PageFinder::getQuery' scares me to add the selector ```saas_id=user()->saas_id``` to my Saas module.
  4. See my module: https://github.com/spoetnik/SaaS On all selected templates, a 'saas_id'-field is added, and populated. I would like to add a selector to all selectors in to filter by saas_id. I could add the selector in all my templates, but that's error-prone, so I prefer to have a hook to add it. Maybe this post could be a starting point?
  5. I am building a module, to restrict access based on a saas_id. I would like to add a selector to all page listings like: saas_id=user()->saas_id what would be a good hook to use?
  6. What would be needed to get this module to work with Processwire 3? I get the error 'FieldtypeRangeSlider: Default value should be in format [int,int]. (1,100) if range is checked'
  7. Here is my setup: My Dockerfile: # # PHP Dependencies # FROM composer:1.7 as vendor COPY web/ /app RUN composer install \ --ignore-platform-reqs \ --no-interaction \ --no-plugins \ --no-scripts \ --prefer-dist # # Frontend # FROM node:latest as frontend COPY --from=vendor /app /app WORKDIR /app/site/templates RUN npm install --global gulp-cli && \ npm --prefix /app/site/templates install gulp /app/site/templates && \ npm --prefix /app/site/templates install /app/site/templates && \ gulp build # # Application # FROM php:7.2.7-fpm-alpine COPY --from=frontend /app /var/www/html WORKDIR /var/www RUN apk add --update $PHPIZE_DEPS \ freetype-dev \ libjpeg-turbo-dev \ libpng-dev \ && docker-php-ext-install iconv pdo pdo_mysql mysqli opcache zip \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ && docker-php-ext-install gd \ && rm -rf /var/cache/apk/* \ && chown -R www-data:www-data . # set recommended PHP.ini settings # see https://secure.php.net/manual/en/opcache.installation.php RUN { \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.interned_strings_buffer=8'; \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ echo 'opcache.fast_shutdown=1'; \ echo 'opcache.enable_cli=1'; \ } > /usr/local/etc/php/conf.d/opcache-recommended.ini \ My dev_docker-compose.yml: version: '3' services: web: image: nginx:alpine volumes: - ./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf:delegated - ./etc/ssl:/etc/ssl:delegated - ./web:/var/www/html:delegated - ./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template:delegated - ./logs/nginx/:/var/log/nginx:cached ports: - "8000:80" - "3000:443" environment: - NGINX_HOST=${NGINX_HOST} command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" restart: always depends_on: - php - mysqldb php: build: ./ image: app:latest restart: always environment: MYSQL_HOST: ${MARIADB_HOST} MYSQL_PORT: 3306 MYSQL_DATABASE: ${MARIADB_DATABASE} MYSQL_USER: ${MARIADB_USER} MYSQL_PASSWORD: ${MARIADB_PASSWORD} volumes: - ./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini - ./web:/var/www/html:delegated - ./assets:/var/www/html/site/assets:delegated composer: image: "composer" volumes: - ./web:/app command: install --ignore-platform-reqs myadmin: image: phpmyadmin/phpmyadmin container_name: phpmyadmin ports: - "8080:80" environment: - PMA_ARBITRARY=1 - PMA_HOST=${MARIADB_HOST} restart: always depends_on: - mysqldb mysqldb: image: mariadb:${MARIADB_VERSION} container_name: ${MARIADB_HOST} restart: always env_file: - ".env" environment: - MYSQL_DATABASE=${MARIADB_DATABASE} - MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD} - MYSQL_USER=${MARIADB_USER} - MYSQL_PASSWORD=${MARIADB_PASSWORD} ports: - "8989:3306" volumes: - ./data/db/mysql:/var/lib/mysql:delegated my prod_docker-compose.yml version: '3' services: web: image: nginx:alpine volumes: - ./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf - ./etc/ssl:/etc/ssl - ./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template - ./logs/nginx/:/var/log/nginx - webroot-volume:/var/www/html ports: - "80:80" - "443:443" environment: - NGINX_HOST=${NGINX_HOST} command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" restart: always depends_on: - php - mysqldb php: image: app:latest restart: always environment: MYSQL_HOST: ${MARIADB_HOST} MYSQL_PORT: 3306 MYSQL_DATABASE: ${MARIADB_DATABASE} MYSQL_USER: ${MARIADB_USER} MYSQL_PASSWORD: ${MARIADB_PASSWORD} volumes: - webroot-volume:/var/www/html - ./assets:/var/www/html/site/assets mysqldb: image: mariadb:${MARIADB_VERSION} container_name: ${MARIADB_HOST} restart: always env_file: - ".env" environment: - MYSQL_DATABASE=${MARIADB_DATABASE} - MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD} - MYSQL_USER=${MARIADB_USER} - MYSQL_PASSWORD=${MARIADB_PASSWORD} volumes: - ./data/db/mysql:/var/lib/mysql volumes: webroot-volume:
  8. So, I have build a form, and I can call this in my template like: <?=AddPostForm/> After submitting this form, the data is passed to a function with all the input values to add the post. Where do you sanitize your data? Is that the responsibility of the form, before passing the data to the function, or do you expect the function to sanitize the data before handling it?
  9. Why?? Why not just php-fpm and nginx as a proxy? That's a more know architecture with blogs explaining the setup, and google-hits when it's not working...
  10. I am playing with the setup in a sandbox. Do I understand it right? For each private group, I create Role, and a Template. Then on the Temaplte of the Parentpage I set Role permissions, so only people in that Role (Group) can view and create Children? So Group -> Role -> Template Access?
  11. I was thinking about a page reference from the user's profile to a group-page, and restrict access by restricting all content by filtering on this reference in all selectors... Would that work?
  12. How would you handle this: A site with private groups. Only members of these groups can see the content posted in these private groups.
  13. I am using Bootstrap3 for my one page template. I would like to be able to open a link in a bootstrap modal. I can't find a CKeditor modal plugin or something. Tried using the 'ProcessWire Edit Link Process' module, and add target="_modal", so I could strreplace something, but this gets stripped by CKeditor. Any suggestions how I could open a link, created in CKeditor, in a modal?
  14. Thanks Lisandi for the recommendations. I had nginx serve the static files, but this wasn't the fastest option. Now Apache serve the static files, and ik enabled gzip, caching etc. I am familiar with cloudflare for another site I am building. That client has his customers all over the world, so a CDN release benefits. This is all Dutch, so I don't see anly real benefits of cloudflare here. I will look into the SEO module, thanks.
  15. A clean, Basic Foundation website, build using Processwire. Team Training For Professionals The client is happy with the site, and using Repeaterfields and Hannacode makes adding FAQ's piece of cake! This was am "in between" hobby project, but as always took much longer estimated.
×
×
  • Create New...