Leaderboard
Popular Content
Showing content with the highest reputation on 06/29/2016 in all areas
-
Hello there and welcome to the forum! We do have site profiles for ProcessWire, so you might want to check those out. Generally speaking they're intended as a "starting point", and you will no doubt have to dig into both front-end and back-end work, at least to some extent. You might also want to check out our markup modules, which may provide some helpful shortcuts for your site building. Since jQuery is just a front-end JavaScript library, you can easily include it on your site, just like any other 3rd party JavaScript library out there. Same thing goes for front-end frameworks like Bootstrap or Foundation: ProcessWire itself doesn't generate any markup for you, which means that you can use any given framework to build your site. ProcessWire is very different from WordPress, and developing sites with ProcessWire is similarly different. I would suggest giving it a try, but if you're looking for a solution that lets you simply start with a complete theme, install all required features as modules, and never touch code or markup.. well, in that case ProcessWire probably isn't the best option for you. On the other hand if you're interested in learning how to build actually working sites and you're not afraid to get your hands dirty every now and then, you'll no doubt fall in love with ProcessWire and the awesome developer API it provides Hope this helps a bit.4 points
-
Hi everyone! Thanks to a tip from Ryan, I now have the latest version of the Tracy core working properly when the core SessionHandlerDB module is installed. This means that I have been able to consolidate the number of packaged versions down to two: Legacy and Master. Now the only reason not to use Master is if you are running PHP < 5.4.4 I will keep the Master version updated with changes to core after testing to make sure there are no issues. The module now automatically adjusts your MySQL max_allowed_packet setting so that it is large enough to handle storing the Tracy debug bar data when you have SessionHandlerDB installed. Ryan has changed the "data" field in the "sessions" database table from text to mediumtext and says he'll be adding this to the upgrade routine shortly, but if you have problems with the Master version, please make this change yourself. Please let me know if you have any problems with the new Master version.4 points
-
3 points
-
Hi and welcome to processwire. You should go through the forum channels and their posts because these questions are already answered many times. Processwire is a decoupled system, build around the concept that everything in the backend is "a page". You can use any css grid or php framework that you want to speed up your work. If you are new to these things I would suggest to start with the pocketgrid css as it is very easy to understand and work with. Flydev has made 2 nice templates available lately for processwire, one is based on bootstrap and the second one is based on foundation: I have setup a preview of these templates here http://dev9.pe.hu and here http://dev8.pe.hu Processwire gives you the highest freedom and power to build websites but like you mentioned you need to know html, css, javascript and php, and above all: the api of processwire. If you don't know this you will only be able to make simple websites with processwire. There are no professional templates for processwire like there are for wordpress. Why do you think wordpress has become so popular: pick a professional template, click it together and in only a few days you have a professional looking website. But this comes also with a price: wordpress isn't the safest system as it gets hacked a lot and wordpress needs a lot of plugins to get things to work. A good example is a multi-language website with wordpress. You need the wpml plugin for this to translate text strings. Not really functional as this solution causes a lot of database calls. You have to use the wpml search option to find the text strings in the database that you need to translate. And wpml is the best you can get for wordpress. That makes you rethink about wordpress. Processwire has multi-language already build in the core, a breeze to use and a real functional solution like it should be. Drop down menus and sliders are the least problems you have to get them in processwire. Right now I am putting the camera slider in a processwire website. http://www.pixedelic.com/plugins/camera/ This is only a matter of pulling the pictures from the processwire backend into the slider html/css. More effort you have to do for setting up your own forms because you need to know the api and php and a bit of abstract thinking. The good thing of processwire is that it makes you completely independent in making a website in any possible way you want or need. But for a non coder it takes time to get there.3 points
-
PW is best suited for developers who want 100% control over the final product (and that of course requires/includes code - be it front- or backend). The final product may be a website, a web app, a REST server - or anything web-based, really. There are some themes floating around that you can use off the shelf (including some that are based on Bootstrap / Foundation), but if you are really "fighting" with HTML, CSS, JS + PHP, ProcessWire might not be your first choice. otoh, you can take any HTML and build PW-templates quite easily. What CSS/JS framework you work with is completely up to you. There are no restrictions or limitations whatsoever. There are many tutorials out there, plus forum posts that will get you up and running very quickly. https://processwire.com/docs/tutorials/3 points
-
@horst Thanks for your feedback and suggestions (I like them all). I pushed an update to github (Version 113) I made this very quickly. It seems to work, but I hadn't time to try out all scenarios. Could you test a bit? Thanks. Version 1.1.3 NEW: user logout triggers cronjob (db-backup permission required) instead of cycle interval. NEW: extension of filename options (user properties) NEW: custom fileinfo (via module settings). Same features like filename (hookable)3 points
-
This demonstrates the idea: http://jonom.github.io/jquery-focuspoint/demos/helper/index.html2 points
-
I have been thinking about what would be the best option for core to handle the frontend variation image cropping. Would simply setting the focus point be enough? That would always be center when cropping (if not explicitly wanted something else). This would require zero configuration, wouldn't contain any design specific information (like image sizes) and would work for both horizontal and vertical images.2 points
-
Updated to v025, here are the latest changes: 0.2.5 (2016-06-28) new RenoTweak: miniScrollbar for main content and sidebar (using perfect-scrollbar.js) added Language Translator page to the supported hotkey save pages 0.2.4 (2016-06-26) remove ctrl+click feature to activate all language tabs of the same language (core feature from ProcessWire 3.023) FireFox fix for clearing filterbox miniScrollbar in action:2 points
-
Docker (http://www.docker.com) is an open platform for building, shipping and running distributed applications. Docker containers are a great way to package a complete application with its specific dependencies in a portable way so that it can easily be deployed on any compatible network or cloud infrastructure. Recently I spent a few days making my ProcessWire site run in a Docker container, and - as I could not find any good tutorial for this - it sounded like a good idea to write one. You will find on the web plenty of presentations and tutorials about Docker, so I won't start with the basic concepts, and this tuto assumes that you have a first understanding of Docker's fundamentals. What we want to do here is to migrate an existing site to a set of docker containers. Therefore, to start with, you should have: - docker installed on your computer; - the site directory of your ProcessWIre site - a backup of your site's MySQL database Let's start. Create a docker container for the site database For several reasons (insulation, security, scalability), it is preferable to host the site database in a separate docker container. 1. Set-up a SQL database with MariaDb or MySQL $ docker run --name database -e MYSQL_ROOT_PASSWORD=rootdbpassword -d mariadb Here I choose to use the MariaDB official container in its latest version, but MySQLwould be just fine as well. 2. Run a PhpMyAdmin container and create the ProcessWire database We first select an simple image with PhpMyAdmin on the Docker Hub: nazarpc/phpmyadmin and we create a docker container based on this image. This container will access the port exposed by the database container via a private networking interface. We specify this with the `--link` option. It can be run temporarily (and exited by ctrl-C): docker run --rm --link database:mysql -p 8881:80 nazarpc/phpmyadmin Or it can be run as a daemon in the background: docker run -d --name phpmyadmin --link database:mysql -p 8881:80 nazarpc/phpmyadmin From phpmyadmin (accessed from your browser at http://hostaddress:8881) you can now create your ProcessWire database, create a dedicated user for it, and import the database content from a previously saved SQL file. Note: alternatively, you can do all database operations from the command line in the database docker container created during step 1, or use another mysql user interface container if you prefer… 3. Update the database parameters in your site configuration In your site's `config.php` file, the sql server name shall be set to `mysql`: $config->dbHost = 'mysql'; Other `$config->dbXxx` settings shall match the database name, user and password of the just-created database. Create a Docker Image for Apache, PHP and the Processwire site 1. Create an image-specific directory with the following contents and `cd` to it bash-3.2$ ls -l . config .: total 16 -rw-rw-rw- 1 jean-luc staff 1163 21 aoû 12:09 Dockerfile drwxr-xr-x 17 jean-luc staff 578 17 aoû 12:48 ProcessWire drwxr-xr-x 7 jean-luc staff 238 21 aoû 12:07 config drwxr-xr-x 7 jean-luc staff 238 20 aoû 18:46 site config: total 160 -rw-rw-rw- 1 jean-luc staff 160 20 aoû 18:28 msmtprc -rw-rw-rw- 1 jean-luc staff 72518 20 aoû 18:56 php.ini where: `ProcessWire` contains the version of ProcessWire that we want to use for this site; It can be retrieved from github with a link like https://github.com/ryancramerdesign/ProcessWire/archive/{version}.zip` For example, the 2.6.13 dev version can be obtained by the link https://github.com/ryancramerdesign/ProcessWire/archive/7d37db8d6b4ca6a132e50aff496a70e48fcd2284.zip `site`: our site-specific files `Dockerfile`: the dockerfile for building the image (see below) `config`: a directory containing specific configuration files copied to the docker image (see below) 2. Set the `Dockerfile` content FROM php:5.6-apache RUN apt-get update \ && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev zziplib-bin msmtp\ && a2enmod rewrite \ && a2enmod ssl \ && docker-php-ext-install mysqli pdo_mysql iconv mcrypt zip \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ && docker-php-ext-install gd EXPOSE 80 EXPOSE 443 # Add a specific php.ini file COPY config/php.ini /usr/local/etc/php/ # Configure the mail sent utility msmtp (http://msmtp.sourceforge.net) and make it readable only by www-data COPY config/msmtprc /usr/local/etc/php/ RUN chmod 600 /usr/local/etc/php/msmtprc \ && chown www-data:www-data /usr/local/etc/php/msmtprc # Remove all default site files in /var/www/html RUN rm -fR /var/www/html/* # Copy ProcessWire core files COPY ProcessWire/wire /var/www/html/wire COPY ProcessWire/index.php /var/www/html/index.php COPY ProcessWire/htaccess.txt /var/www/html/.htaccess # Copy site-specific files COPY site /var/www/html/site # Make www-data the owner of site-specific files RUN chown -R www-data:www-data /var/www/html/site VOLUME /var/www/html/site Based on the official image `php:5.6-apache`, it installs missing packages to the system, adds mod-rewrite and mod-ssl to Apache, plus a number of PHP modules needed by Processwire (core or modules): mysqli, pdo_mysql, iconv, mcrypt, zip, and gd. Then it copies the site files to the location expected by the Apache server. Finally it declares a Docker volume `/var/www/html/site` (i.e. the site files and assets), so that it can be shared with other containers. 3. Set the msmtp configuration We need to configure a sendmail utility, so that we can send emails from php, for example when a user registers on the website. The simplest way to do it is to rely on an external smtp server to do the actual sending. That's why we use msmtp. - define the desired smtp account in `config/msmtprc` account celedev-webmaster tls on tls_certcheck off auth on host smtp.celedev.com port 587 user webmaster@celedev.com from webmaster@celedev.com password thepasswordofwebmasteratceledevdotcom - in `config/php.ini`, configure the sendmail command so it uses msmtp: sendmail_path = /usr/bin/msmtp -C /usr/local/etc/php/msmtprc --logfile /var/log/msmtp.log -a celedev-webmaster -t 4. Build the Docker image docker build -t php-5.6-pw-celedev . 5. Create a Data-only container for the site files docker run --name celedev-data php-5.6-pw-celedev echo "Celedev site data-only container" 6. Run the web server container docker run --name celedev-site -p 8088:80 --link database:mysql --volumes-from celedev-data -d php-5.6-pw-celedev Note that this container is linked to our database and shares the 'celedev-data' volume created previously During development, it can be convenient to keep an access to the host file system from the container. For this, we can add a shared volume to the previous command: docker run --name celedev-site -p 8088:80 --link database:mysql -v /Users/jean-luc/web/test-docker:/hostdir --volumes-from celedev-data -d php-5.6-pw-celedev Our ProcessWire website is now up and running and we can test it in our browser at http://hostaddress:8088. Great! What we now have in Docker bash-3.2$ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE php-5.6-pw-celedev latest 2aaeb241c2e2 3 hours ago 1.149 GB nazarpc/phpmyadmin latest e25cd4fd48b3 8 days ago 521 MB mariadb latest dd208bafcc33 2 weeks ago 302.2 MB debian latest 9a61b6b1315e 5 weeks ago 125.2 MB bash-3.2$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 68cc5d976f0d php-5.6-pw-celedev "apache2-foreground" 20 hours ago Up 20 hours 443/tcp, 0.0.0.0:8088->80/tcp celedev-site 0729fe6d6752 php-5.6-pw-celedev "echo 'Celedev site d" 20 hours ago Exited (0) 20 hours ago celedev-data e3e9e3a4715c mariadb "/docker-entrypoint.s" 3 days ago Up 3 days 3306/tcp database Saving the site data We can create an archive of the site files by running a tar command in a dedicated container: bash-3.2$ docker run --rm -it --volumes-from celedev-data -v /Users/jean-luc/web/test-docker:/hostdir debian /bin/bash root@2973c5af3eaf:/# cd /var/www/html/ root@2973c5af3eaf:/var/www/html# tar cvf /hostdir/backup.tar site root@2973c5af3eaf:exit bash-3.2$ Tagging and archiving the Docker image We can also add a tag to the docker image that we have created in step 4 (recommended): bash-3.2$ docker tag 2aaeb241c2e2 php-5.6-pw-celedev:0.11 bash-3.2$ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE php-5.6-pw-celedev latest 2aaeb241c2e2 3 hours ago 1.149 GB php-5.6-pw-celedev 0.11 2aaeb241c2e2 3 hours ago 1.149 GB nazarpc/phpmyadmin latest e25cd4fd48b3 8 days ago 521 MB mariadb latest dd208bafcc33 2 weeks ago 302.2 MB And we can archive this image locally if we dont want to push it now to the Docker Hub: bash-3.2$ docker save php-5.6-pw-celedev:0.11 | gzip > php-5.6-pw-celedev-0.11.tar.gz And that's it! You now have a portable image of your ProcessWire website that you can run directly on any docker-compatible system.1 point
-
1 point
-
In case someone stumbles upon this here is a solution to a IFRAME embedded PW based site with Internet Explorer as user client. In a true style of the most hated browser ever it will potentially throw you a curb ball when dealing with authentication, form submission etc. It is to do with IE security enforcements and session cookies. So you might want to try this in addition to CSRF and sessionFingerprint settings: in your .php add header('P3P: CP="NOI ADM DEV COM NAV OUR STP"'); or your markup add: <meta http-equiv="P3P" content='CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"' /> if you care about the details just Google it. Long story short IE seems to be the only browser that enforces an old, largely defunct standard that never took off. enjoy!1 point
-
Thank you very much. Your tutorial was helpful. Couldn't get it eright for ages!1 point
-
Ok. One solution is to extend ProcessWire\Wire: class Utils extends \ProcessWire\Wire { public function func() { $this->_('car'); } }1 point
-
Hi @kixe, first just want to say thanks for this useful module (if I don't have already)! And I want to share a usage that propably wasn't intended with your module, but I find it useful for small sites where content changes slightly in a weekly manner or less. I use a hook into Session::logout in the ready.php file that invokes a DB-Backup. Currently the simplyfied code looks like: /* Autobackups */ $wire->addHookBefore("Session::logout", function(HookEvent $event) { if(!wire('user')->hasPermission('db-backup')) return; if(wire('modules')->isInstalled('CronjobDatabaseBackup')) { // execute a cronBackup ignore_user_abort(true); set_time_limit(120); $cdb = wire('modules')->get('CronjobDatabaseBackup'); $e = new HookEvent(); $cdb->cronBackup($e); } return; }); This is a bit hacky. What do you think about to embedd a public method to do this more transparent. Also it would be good if the description ($fileinfo) could be set dynamically with this method or as separate method or option. Currently I have hacked this into the module to be able to set it like: "logout horst (CronjobDatabaseBackup)". Anyway, also without that, it is a big, big helper!1 point
-
The latest version now contains three different versions of the Tracy core! Yes, it's a pain and I don't want to maintain them either, and hopefully I can ditch one of these versions shortly if PW's SessionHandlerDB module can be tweaked to work with Tracy - more details below. Stable (now the old 2.3 branch) supports PHP 5.3 and because PW supports 5.3, I'll keep this version included until PW shifts to 5.4. doesn't capture AJAX requests works with the PW core SessionHandlerDB module Master (this version is actually a version from a couple of months ago now) needs PHP 5.4 doesn't capture AJAX requests works with the PW core SessionHandlerDB module Latest (this is the current dev version, currently 2.4 - I'll keep this fairly up to date) needs PHP 5.4 captures AJAX requests it does NOT currently work properly with the PW core SessionHandlerDB module - there are db table field length restrictions, issues with the MYSQL max_allowed_packet setting, and it prevents the capturing of AJAX requests if it's installed. The errors can be fixed by tweaking your sql settings, but you still can't get AJAX requests working. Yes, the names of these versions are no longer correct. I will be changing these soon, but didn't want to do too much on this at once. I personally have decided to give up on SessionHandlerDB until it can be tweaked so that it doesn't break the latest version of Tracy. I find the features in the latest Tracy core worth it, but it's up to you guys what you want to do. I'd be curious to hear which version you decide to use. Let me know if you have any questions.1 point
-
I got a client request to make Word template so she can create an image of the weekly menu of a restaurant to post on Facebook. I usually get sick when I have to deal with M$ Word - it's frustration and it's not meant to be used things like that. So I figured out a better system: PW + html2canvas.js. It took more time to finish but it was worth the trouble. The main issues were html2canvas versus some CSS issues, plus switching to different languages in PW on each line. Also, JavaScript cannot offer named downloads, only "download.png", so I had to use HTML5 attribute "download" on links to be able to add custom download filename. I used ProField modules Table and Matrix Repeater which allow very pleasant editing of menu items, even in multilanguage context. Front-end editing is created using the built-in front-end editor. I was about to achieve inline editing of menu items but it soon turned out that repeaters and tables can't be edited this way. Anyway, it's still better compared to my module FEEL because sections are reloaded using Ajax and the admin lightbox shows only the fields I choose. Here's a quick screencap - when the gray background turns to dark gray, then the menu is not HTML but canvas, that can be downloaded.1 point
-
Filed an issue, as I was able to reproduce this. https://github.com/ryancramerdesign/ProcessWire/issues/3581 point
-
It looks like I figured out, how to deal with it. I just commented out the lines in ProcessPageAdd.module that prove the user's right to access a specific template /* if($t->useRoles && !$user->hasPermission('page-create', $t)) continue; if(!$t->useRoles && !$parentEditable) continue; if(!$t->useRoles && !$user->hasPermission('page-create', $this->parent)) continue; */ Yeah, It's dirty, but it works ;-)1 point