Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/26/2015 in all areas

  1. ProcessSlider Module (alpha version) Repository https://github.com/mauricius/ProcessSlider Introduction Like many of you, I came to ProcessWire from Wordpress and immediately I fell in love with its power and its clean syntax. I have to say that PW has become my default choice for building websites. However there is only one thing that me and my clients miss from WordPress and is the ability to visually build image sliders through plugins (Nivo, Revolution Slider, LayerSlider, just to name a few). So I decided to create a module for this purpose. ProcessSlider essentialy is an editor for the wonderful Jssor plugin (http://www.jssor.com/) which is absolutely free. The module creates a new page under the Setup menu which allows users to easily add image sliders on the site using an intuitive visual editor. To each slider you can easily add images and other custom and animate them using the transition effects provided by the Jssor slider. The ProcessSlider module in reality is composed by three different modules: ProcessSlider: the main module InputfieldSlider/FieldtypeSlide: allows the user to use an existing slider inside a page MarkupSlider: converts the slider into Jssor compatible markup and optionally provides the necessary initialization script Features Custom slider size Drag and Drop interface Move and resize elements Slides background with images from existing PW pages Slider Preview (with the provided MarkupSlider module) Predefined style classes for Elements Add or remove Slides Add or remove elements Change slide order visually Jssor skins and bullets support Visual Timeline Optional responsive/fullwidth slider Predefined elements: Images, Text, Links, Image as link, Div blocks, Youtube Videos Animation Options (In and Out): Animation type, Delay, Duration The editor is built with Vue.js+Webpack and uses jQuery for D&D and resize functionalities. Release I'm going to release the module in a couple of weeks, there are still some minor tweaks and improvements that I would like to add. Demo Screencast (be sure to watch it at least at 720p) I hope it will be helpful to the community and I would be glad to get feedback or suggestions for improvement! Please also consider that it is my first PW module, so probably I'm missing some best practices, hopefully the most experienced developers can throw me some hints
    6 points
  2. Thanks for the advertisement @mr-fan. Just to let you guys know here, the dev version of this module actually has a new "Lister" mode that works without ListerPro and allows you to embed a customized Lister into the editing interface for any page on your site.
    6 points
  3. It's funny to see you quote my request for such an tutorial and now I'm very much feeling able to answer your questions here. Currently the best resource for handling all those mentioned things is really ProcessWire itself. If you want to know how to handle a custom CI Design in the backend - take a look at AdminThemeReno - it was born out of a custom backend interface and then ported over to pw. Maybe the new custom colorschema feature of Reno does fit your needs, but otherwise just clone one of those admin themes to site/modules/ and tinker away. About custom interfaces: All the Process* modules represent (full) interface-pages in the backend, and lot of the 3rd party modules are injecting things into those pages. Just take a look at those an see how they handle things. Maybe the most interesting Process module is ProcessPageEdit, as it is maybe the most used one. For module that inject things I'd say BatchChildEditor is a quite sophisticated one. After a little playing around with those files and creating own ones, you'll see that even the backend consists of only a few concepts: the Process/Module Interfaces, the Form api, the Inputfield / Fieldtype interfaces and Wire / WireArray classes. The other core classes should only be from interest if you really need them.
    6 points
  4. We're lightyears ahead.
    5 points
  5. I just attended one of the free A List Apart live-events and was quite amazed. The big topics that were discussed were how to chose a cms, evaluating not only the frontend, but also the author/backend user experience and workflow needs and finally the current interest in decoupled cm-systems. The great thing was, that on all of those topics I was constantly thinking how nice it is to handle these things in PW. Some may include more work than others, but in the end it's really avoiding lots of those mentioned difficulties / roadblocks with cmss. So my conclusion is really "I love my CMS" . For the curious I've included the link to the event page, where the hangout/transscript will be posted later and the hangout link, so you can watch it as long as the event page isn't updated. Maybe someone did even watch it live as well. http://alistapart.com/event/content-management https://plus.google.com/events/clcdcbjo5puojn47aprk5plkem0?authkey=CMP6kImisby_tgE
    3 points
  6. Here's a simple way to add autocomplete and 'tags' to your tags field, using admin custom files; you would first need to have admin custom files running and enabled for page edit. this example uses Tag-it! because it stores the tags in a way that seems to work with PW's field (note this is still proof of concept and being tested, but works so far); http://aehlke.github.io/tag-it/ 1.) add the tag-it.min.js to your admin custom files or paste it directly into your ProcessPageEdit.js file. 2.) paste in the CSS into your ProcessPageEdit.css file 3.) Initialize the tags after the plugin, in your ProcessPageEdit.js $(function(){ $(".Inputfield_images input[name^='tags_images_']").each(function() { $(this).tagit({ availableTags: ["kenburns", "test"], singleFieldDelimiter: ' ' }); }); }); you can set it up so that you initialize the field based on it's name and then set your tags with the availableTags option. the CSS needs to be adjusted to be compatible with the jqueryui settings used by PW admin; this is my current CSS, but needs some work still (though it works): ul.tagit { /* padding: 1px 5px; */ padding: 7px 5px; overflow: auto; margin-left: inherit; /* usually we don't want the regular ul margins. */ margin-right: inherit; border-top: 1px #ccc solid; } ul.tagit li { display: block; float: left; margin: 2px 5px 2px 0; } ul.tagit li.tagit-choice { position: relative; line-height: inherit; background: #BBCEF1 !important; } ul.tagit li span { color: black !important; } a.tagit-close { /* background: #eee; */ } input.tagit-hidden-field { display: none; } ul.tagit li.tagit-choice-read-only { padding: .2em .5em .2em .5em; } ul.tagit li.tagit-choice-editable { padding: .2em 18px .2em .5em; } ul.tagit li.tagit-new { /* padding: .25em 4px .25em 0; */ padding: 0; } ul.tagit li.tagit-choice a.tagit-label { cursor: pointer; text-decoration: none; } ul.tagit li.tagit-choice .tagit-close { cursor: pointer; position: absolute; right: .1em; top: 50%; margin-top: -8px; line-height: 17px; } /* used for some custom themes that don't need image icons */ ul.tagit li.tagit-choice .tagit-close .text-icon { display: none; } ul.tagit li.tagit-choice input { display: block; float: left; margin: 2px 5px 2px 0; } ul.tagit input[type="text"] { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; border: none; margin: 0; padding: 0; width: inherit; background-color: inherit; outline: none; } there are a few other good tagging plugins for jquery and i've been gradually testing them and trying them out; but for simple needs, this example may be pretty workable. One other caveat - since the plugin initializes on the field and modifies the way it looks, it will trigger the changed field, and consequently ask you if you want to save the page, on exit, even if you didn't change any fields on the page... *plugin init edited to change the stored tag delimiter for PW image tags field
    3 points
  7. For listing pages or subpages, import, export and editing stuff https://processwire.com/talk/topic/6102-batch-child-editor/ is a very heavy tool that is released as opensource...as an little alternative. But i agree i install Lister Pro on every Page and have a very easy setup of listing things for my users...but i've no problem if it stays comecial....since i love to support my CMS/CMF of choice and his developer ryan with this small contribution. I know you wrote the same - but it shouldn't integrate in the core - since PW is more intended as a (very powerful) toolbox than a ready to use CMS. So buy Lister Pro is like spending the development some money AND get two things for that contribution 1) good feeling 2) really good module best regards with good feelings mr-fan
    2 points
  8. Same solution as Reno, but I'd compare the timestamps and not date strings $now = time(); $expires = strtotime($page->select_timed_expire); // If you have a date string as output format
    2 points
  9. Something like this? $now = date("Y-m-d h:i:s"); $expires = $page->select_timed_expire // assuming you set output format for this field to the same as $now. if ($now < $expires){ echo "<img src='{$page->timed_image->url}'/>"; } else { // do something else or nothing. }
    2 points
  10. Sure! I'm definetly going to write about it in a future blog post. It's my first project using Vue.js and I was very impressed with its potential, however the community is still quite small, so I had to figure out many things just by myself, especially regarding the implementation of sub-components, nevertheless I'm happy with the result. I'm planning to use it again in the future. Also thanks everyone for the warm welcome and positive reactions.
    2 points
  11. So what you're saying is we're already ahead of the game? I like it To paraphrase Terminator 2:
    2 points
  12. It's partly that, but mostly that the whole presentation-layer is already decoupled. So you can already go and choose whatever system you like to create the presentation, while other CMSs are quite tightly couple (think of wp loops).
    2 points
  13. FieldtypeMatrix and InputfieldMatrix Modules Directory: http://modules.processwire.com/modules/fieldtype-matrix/ GitHub: https://github.com/kongondo/FieldtypeMatrix The module Matrix enables you to save data from a 2D-Matrix table. The rows and columns of the matrix table are made up of pages retrieved via a ProcessWire selector or via a page field selection of parent pages. The matrix values are made up of the data input in the matrix cells, i.e. the 'intersection of rows and columns'. Example Usage You have Products whose prices vary depending on colour, size, material, etc. Using the Fieldtype, you can create a table with rows made up of colours and columns made up of sizes the combination of each making up their respective values (in this case price). So rather than creating multiple text fields to do the following: Colour Size Price Red Small £10 Red Medium £20 Red Large £30 Red X-large £35 Green Small £9 Green Medium £15 Etc... You can instead have the following in one field: Small Medium Large X-Large Red £10 £20 £30 £35 Green £9 £15 Blue Etc... Yellow Purple If you set a selector in the Field's settings, to retrieve pages to build your matrix's rows and columns, it follows that all pages using the template the Fieldtype is attached to will have identical rows and columns. In some cases, this could be the intention. For instance, you might have 'Car' pages, e.g. Audi, Volvo, Ford, Citroen, Mazda, BWM, etc., each of which uses a 'Cars' template that has a single FiedltypeMatrix called 'car_attributes'. If you set a selector to build the Fieldtype's rows and columns, your users can easily compare the cars based on a combination of different values. The following matrix table best illustrates this: Type Engine Size Fuel Efficiency Carbon Emissions Warranty Road Tax Price 1994 Audi brand 1 values, etc. 2000 Audi brand 2 2006 Audi brand 3 2012 Audi brand 4 Each of your car pages would have similar matrices. This allows you to make easy but powerful queries. Such a setup allows you to compare within and across car brands. Say you wanted to find out which car(s) offered the best value for money given certain parameters such as warranty, emissions etc. You can easily make such comparisons (see code below). You can also compare within one car type, e.g. which brand of BMWs does best in what area...The possibilities are endless. In the database, Rows and column pages data are stored as their respective page->id. Matrix-values store any data (varchar(255)). If instead you wanted a template's pages to each have a matrix built of different rows and columns, you would have to name a Multiple Page Field (attached to the same template as the as your matrix field) in the matrix field's settings. When editing those pages, your matrix table's rows and columns will be built using the published children pages of the 2 pages you select in the Multiple page field.. The module allows the creation of matrix tables of any sizes (rows x columns). The rows and columns dynamically grow/shrink depending on the addition of row/column pages that match what you set in the matrix field's settings (see its 'Details Tab'). Please note that, if such pages are deleted/trashed/hidden/unpublished, their data (and presence) in the matrix are also deleted. Entering values in the matrix You have three choices: Manually entry Uploading a comma delimited (CSV) file. This can be delimited by other characters (tab, pipe, etc); not just commas Copy-pasting CSV values. (Tip: you can copy paste directly from an Excel spreadsheet. Such values will be 'tab-delimited'). In addition, if your server supports it, in the field's settings, you can enable the use of MySQL's fast LOAD DATA INFILE to read and save your submitted CSV values. Note that for large tables, you may have to increase your PHP's max_input_vars from the default 1000 otherwise PHP will timeout/return an error and your values will not be saved. I have successfully tested the module with up to ~3000+ values (10x350 table), the Fieldtype is not really optimised (nor was it intended) to handle mega large matrix tables. For such, you might want to consider other strategies. Install Install as any other module. API + Output A typical output case for this module would work like this: The matrix's rows, columns and values are subfields of your matrix's field. So, if you created a field called 'products' of the type FieldtypeMatrix, you can access as: product.row, product.column and product.value respectively foreach($page->matrix as $m) { echo " <p> Colour: $m->row<br /> Size: $m->column<br /> Price: $m->value </p> "; } Of if you want to output a matrix table in the frontend: //create array to build matrix $products = array(); foreach($page->matrix as $m) $products[$m->row][$m->column] = $m->value; $tbody ='';//matrix rows $thcols = '';//matrix table column headers $i = 0;//set counter not to output extraneous column label headers $c = true;//set odd/even rows class foreach ($products as $row => $cols) { //matrix table row headers (first column) $rowHeader = $pages->get($row)->title; $tbody .= "<tr" . (($c = !$c) ? " class='even' " : '') . "><td class='MatrixRowHeader'>" . $rowHeader . "</td>"; $count = count($cols);//help to stop output of extra/duplicate column headers foreach ($cols as $col => $value) { //matrix table column headers $columnHeader = $pages->get($col)->title; //avoid outputting extra duplicate columns if ($i < $count) $thcols .= "<th class='MatrixColumnHeader'>" . $columnHeader . "</th>"; //output matrix values $currency = $value > 0 ? '£' : ''; $tbody .= "<td>" . $currency . $value . "</td>"; $i++; } $tbody .= "</tr>"; } //final matrix table for output $tableOut = "<table class='Matrix'> <thead> <tr class=''> <th></th> $thcols </tr> </thead> <tbody> $tbody </tbody> </table>"; echo $tableOut; The module provides a default rendering capability as well, so that you can also do this (below) and get a similar result as the first example above (without the captions). echo $page->matrix; Or this foreach($page->matrix as $m) { echo $m; } Finding matrix items The fieldtype includes indexed row, column and value fields. This enables you to find matrix items by either row types (e.g. colours) or columns (e.g. sizes) or their values (e.g. price) or a combination of some/all of these. For instance: //find all pages that have a matrix value of less than 1000 $results = $pages->find("products.value<1000"); //find some results in the matrix (called products) of this page $results = $page->products->find("column=$country, value=Singapore");//or $page->products->find("column=$age, value>=25"); //$country and $age would be IDs of two of your column pages Other more complex queries are possible, e.g. find all products that are either red or purple in colour, come in x-large size and are priced less than $50. Credits @Ryan on whose Fieldtype/InptufieldEvents this is largely based @charger and @sakkoulas for their matrix ideas Screens Field Details Tab Inputfield Larger matrix table Example output
    1 point
  14. 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
  15. My second site done with PW! Fairly simple site though http://sensoriaoficial.com It uses Multi Language modules and a small module found at the forums (and later here) to set the home page to a specific language. And what I love most about PW, a straightforward one page admin for my client to edit their texts, add images to slider. change music file. Can't get any easier!
    1 point
  16. In tutorials section of the site we are encouraged to request tutorials. This topic is such a request. ProcessWire is advertised to be great in not only building unique frontend features, but also custom backends. I would be very much interested in tutorial on building a custom backend for a site. I put some questions that could be covered in such a tutorial in a list below: How to create custom backend pages How to change the default starting page for admin users How to serve different backends to different users depending on roles How to style the page tree (I have seen it styled in some Soma's video tutorials, so it is a request for a best practice or an advice) Anything else you think appropriate here))) If someone could generously provide a screencast of a custom backend workflow it would be great tutorial in itself.
    1 point
  17. Hey kongondo - I know you are super-busy at the moment, but I actually have a use case where it would be much easier if it did store empty values. Because I am foreaching through column names I actually ended up having to put "ND" (for No Data) in the cells to get the desired result. This isn't a huge problem because I control the data going into the Matrix tables, but I think it might be a nice option to have. Thanks!
    1 point
  18. No ad - just the truth You know that on the import/export topic i was involved in testing - BCE works much better than CSV-Export or Lister-Export. (I'm little behindhand with my german translation for the dev... ..summertime is always a appointment mess)
    1 point
  19. As I tried to tell you above ProcessWire cannot know how to handle pagination pages, where the selector returns an empty set. Pagination isn't more than just limiting the returned set of pages. PW cannot guess what else you're doing on that page, or if maybe this empty set will be modified later. Blindly throwing 404 errors would make this system greatly more inflexible. You can always handle those things on your own just like you need it. To iterate on your 404 problem: 404 errors do always respond directly on the requested url, no matter where in pw. Only the status-code will change to 404.
    1 point
  20. Aha, so this is what they mean with decoupled cm-systems.
    1 point
  21. I've never really used Lister beyond its implementation on the Users page in the admin to be honest. But then there's always one who'll have the opposite view
    1 point
  22. 1 point
  23. What part do you consider critical about ListerPro, that the core Lister doesn't give you? I've sites running, which do work without any lister as well as ones, where Lister(Pro) wasn't flexible enough so I had to create custom modules to list things and add custom overviews and functionality. Therefore I don't see whats so critical about it.
    1 point
  24. IMO, ListerPro is the only pro module which provides such absolutely critical functionality that the core CMS is incomplete without it.
    1 point
  25. Thanks everyone! @rick Yeah, as I said I'm planning to release the first alpha version in a couple of weeks, your feedback will be very welcome.
    1 point
  26. Welcome @mauricius. This looks really awesome! PS: Best way to get early feedback is to publish a alpha- or beta-state github repo and post the link here. EDIT: PPS: yuhu, I saw & liked it first!
    1 point
  27. Thank you all for the suggestions, I'll do some more research and create a prototype in the next days and I'll come back here. @mr-fan, I've found another script that seems good (but I rather develop my own because this will be a LTS product)-> http://codecanyon.net/item/digi-online-examination-system-does/8610180 Best regards, Sergio
    1 point
  28. Good work! Regarding best practises, the only suggestion I have is that the tutorial should be changed to use environment variables for the database connection. This has several benefits, for an example It would be very easy to launch a separate development site, which uses a different database, because all you need to change is the environment variable when launching the development web container You could easily use the same config.php as a template for new sites You don't have to store sensitive information in your version control The config.php becomes more cloud compatible (i.e. a twelve-factor app) Also since the MySQL-container is linked to the web-container, the config.php can directly use the environment variables set by Docker. An example config.php would be $config->dbHost = getenv("MYSQL_PORT_3306_TCP_ADDR"); $config->dbName = getenv("MYSQL_DBNAME"); $config->dbUser = getenv("MYSQL_DBUSER"); $config->dbPass = getenv("MYSQL_DBPASS"); $config->dbPort = getenv("MYSQL_PORT_3306_TCP_PORT"); Obviously launching the web container(s) would need to include these variables too, e.g. docker run -e "MYSQL_DBNAME=mypwdb" -e "MYSQL_DBUSER=mypwdbuser" -e "MYSQL_DBPASS=mypwdbpass" --name celedev-site -p 8088:80 --link database:mysql --volumes-from celedev-data -d php-5.6-pw-celedev Just my two cents
    1 point
  29. 1 point
  30. It's just a 404 message. I'm with that the editor doesn't need to edit that text. That's why it's set in the core (page id) to be only listed in the page tree for superusers. The 404 is just a regular page that is defined in the config via page id. You can overwrite that with $config->http404PageID = 1024; But this will just that page also. SOmething like kongondo would be a solution to still make it. You could add a settings page or even better a custom 404 page with the same template as the 404 page and have it in the tree set hidden. To replace the rendered page of the 404 page with your own created page, you can add a hook with a autoload module. Look at HelloWorld.module which is such a module that autoloads on each request. ... public function init() { $this->addHookAfter("ProcessPageView::pageNotFound", $this, "hook404Page"); } public function hook404Page($event){ header("HTTP/1.1 404 Page Not Found"); $page = wire("pages")->get("/404/"); // get your 404 page $this->wire('page', $page); $event->return = $page->render(); // render and return that page }
    1 point
×
×
  • Create New...