Leaderboard
Popular Content
Showing content with the highest reputation on 11/20/2016 in all areas
-
Hello, I have written a small module which adds UIKit Framework markup to images added with CK-Editor Here are some screenshots: 1) Default view 2) Hover over image shows an overlay and a tooltip info 3) Open in UIKit lightbox How does it work? The module uses Simple HTML DOM Parser for all the manipulations, so this file is also included in the module folder, but it doesnt add any UIKit CSS or Javascript. So you have to load the UIKit framework by yourself. What manipulations take place? Adds UIKit CSS classes to various tags (figure, anchor, image) Adds "no-align" class to tags (figure, image anchor) without alignment, so it could be also styled with CSS Adds an extra surrounding span container to images with no alignment and no figure tag to force block element behaviour Adds UIKit lightbox attribute to linked images Adds image alt attribute as title attribute for linked images on anchor tags / creates fallback if no alt attribute is present Adds UIKit tooltip attribute to all anchors of linked images (tooltip text can be translated in the module translation file) Adds UIKit overlay containers (additional markup) to linked images for overlay effect on hover Example of Markup manipulation: BEFORE <figure class="align_left hidpi"> <a href="/site/assets/files/5556/bora_bora_3.jpg"> <img alt="Rochen" src="/site/assets/files/5556/bora_bora_3.150x0-is-hidpi.jpg" width="150"> </a> <figcaption>Rochen</figcaption> </figure> AFTER <figure class="uk-align-left hidpi"> <a href="/site/assets/files/5556/bora_bora_3.jpg" title="Opens the image in a lightbox view" data-uk-tooltip="" data-uk-lightbox="{group:'my-group'}" class="uk-thumbnail"> <div class="uk-overlay uk-overlay-hover"> <img alt="Rochen" src="/site/assets/files/5556/bora_bora_3.150x0-is-hidpi.jpg" width="150"> <div class="uk-overlay-panel uk-overlay-background uk-overlay-icon"></div> </div> </a> <figcaption class="uk-thumbnail-caption">Rochen</figcaption> </figure> How to install the module? Download the module: TextformatterUIKitImages.zip Github: Download from Github Extract the folder and upload the unzipped folder (including both files - simple_html_dom.php, TextformatterUIKitImages.module) into the site/modules folder. Please let both files into the TextformatterUIKitImages folder - TextformatterUIKitImages (folder) -|- TextformatterUIKitImages.modules (file) -|- simple_html_dom.php (file) Install the module as all other modules and add it f.e. to the body field. Hint: I dont maintain the module, so its only here for people who are using UIKit framework too and want to manipulate the image markup of images added with CKEditor. It can also be used as a starting point for your own image markup manipulation module. Best regards Jürgen5 points
-
Hello, This is a very simple module that helps you asserting if the server has all the requirements for running ProcessWire. Helpful if you are developing in local and then have to upload to a production server. https://github.com/NinjasCL/ProcessServerAssert5 points
-
4 points
-
It might be a nice feature for the api-explorer as well. Have your own code's documentation exported to dash ❤️3 points
-
As an alternative, you can use a site grabber/ripper tool, e.g.: https://www.downloadcloud.com/website-ripper.html Also, you might want to purchase the new ProDevTools module with the API Explorer in it (provided it will be released before you leave): https://processwire.com/blog/posts/processwire-3.0.41-and-a-look-at-api-explorer/3 points
-
Maybe it's a small site in terms of visitor numbers, but I wouldn't want that to be my inbox3 points
-
Image & File Dependencies Allows Image and File fields to be used in inputfield dependency selectors. Note: prefix field names with an underscore in your dependency selectors. Usage Install the ImageFileDependencies module. You can now create an inputfield dependency based on the number of images or files added to a Image or File field. When you create an inputfield dependency for a Image or File field, prefix your field name with an underscore. Example for a field named 'images': _images>3 Note that you do not include a '.count' subfield in the selector. https://github.com/Toutouwai/ImageFileDependencies Demo2 points
-
Hello @Speed, when developing in Chrome, you can disable the cache in the developer tools under the network tab or network conditions drawer permanently, as long as the developer tools are open. Regards, Andreas2 points
-
Perhaps this new config field could be a field for entering a selector, that would allow more flexibility.2 points
-
Yeah this is doable I suppose but Robin does have a good point, this could add some time to your queries as they would be saving the data to the same database that you are querying. You may want to look into something so that you can track analytics on the terms that you are tracking. I have used piwik in the past for this and google analytics also has a really great method of logging this. One other method if you just want a log would be to use the processwire $log variable to save a log of the term to a log file. https://processwire.com/api/variables/log/ If you want to save to a page you can do this (just stole this from an old post by soma so I don't have to type): $p = new Page(); // create new page object $p->template = 'page'; // set template name here $p->parent = $pages->get('/search-terms/'); // set the parent $p->name = 'mynewpage_url'; // give it a name used in the url for the page $p->title = 'My New Page'; // set page title (not neccessary but recommended) $p->save(); To use mail just read about wiremail2 points
-
It sounds a little unusual (typically you would use an analytics service to track this kind of stuff) but quite doable. You would do it all in your Search template - I don't think there is any issue regarding GET/POST. You sanitize and check the search terms from $input and if they meet your criteria then send the email and create the page. Then output the search results. It would slow down your search results a bit. If that is a problem you could look at using a queue but I don't know much about that.2 points
-
I started to get my hands on hooks for the first time and think that Captain Hook (like the Cheatsheet) are great resources. Unfortunately (or fortunately if you want) has the documentation inside the files moved the line numbers of the linked hooks, so that the links on Captain Hook don't point to the right direction anymore. Also they use the old repository. If the links could be updated, that would be great. To be future-proof I saw recently this thread: Maybe with APIGen and the API Reference there is not much need for Captain Hook anymore, but as it is cross linked in many places (f.e. AdminThemeReno), this would be great for beginners like me. Regards, Andreas2 points
-
Problem solved. This worked for me https://processwire-recipes.com/recipes/change-homepages-default-language/2 points
-
On my list to try one day: http://lostgrid.org/ PostCSS and Lost video tutorials: https://goo.gl/7Nxkhw2 points
-
forked from ungrid and changed to work with flexbox: https://github.com/Eroica/unflex2 points
-
This week we've got a new master version 3.0.41 and this post covers what's new. We also take a look at the API Explorer module from the ProDevTools set of modules, which will be released next week. https://processwire.com/blog/posts/processwire-3.0.41-and-a-look-at-api-explorer/2 points
-
hey kixe, also the best wishes to you would you mind doing a short screencast so that we do not have to install it, create the fields etc... http://www.cockos.com/licecap/ is a cool small tool to do that in seconds on win/osx. it creates a GIF so you don't even have to upload it to youtube or the like. just record and post it directly here in the forum. thank you for sharing your module2 points
-
1 point
-
FieldtypeMapMarker Module for ProcessWire 2.1+ This Fieldtype for ProcessWire 2.1+ holds an address or location name, and automatically geocodes the address to latitude/longitude using Google Maps API. This Fieldtype was also created to serve as an example of creating a custom Fieldtype and Inputfield that contains multiple pieces of data. Download at: https://github.com/r...ldtypeMapMarker How to Use To use, install FieldtypeMapMarker like you would any other module (install instructions: http://processwire.c...wnload/modules/). Then create a new field that uses it. Add that field to a template and edit a page using that template. Enter an address, place or location of any sort into the 'Address' field and hit Save. For example, Google Maps will geocode any of these: 125 E. Court Square, Decatur, GA 30030 Atlanta, GA Disney World The address will be converted into latitude/longitude coordinates when you save the page. The field will also show a map of the location once it has the coordinates. On the front end, you can utilize this data for your own Google Maps (or anything else that you might need latitude/longitude for). Lets assume that your field is called 'marker'. Here is how you would access the components of it from the API: <?php echo $page->marker->address; // outputs the address you entered echo $page->marker->lat; // outputs the latitude echo $page->marker->lng; // outputs the longitude Of course, this Fieldtype works without it's Inputfield too. To geocode an address from the API, all you need to do is set or change the 'address' component of your field, i.e. <?php $page->marker->address = 'Disney Land'; $page->save(); // lat/lng will now be updated to Disney Land's lat/lng1 point
-
Croppable Image 3 for PW 3.0.20+ Module Version 1.2.0 Sponsored by http://dreikon.de/, many thanks Timo & Niko! You can get it in the modules directory! Please refer to the readme on github for instructions. - + - + - + - + - + - + - + - + - + - NEWS - 2020/03/19 - + - + - + - + - + - + - + - + - + - There is a new Version in the pipe, that supports WebP too: - + - + - + - + - + - + - + - + - + - NEWS - 2020/03/19 - + - + - + - + - + - + - + - + - + - ------------------------------------------------------------------------- Updating from prior versions: Updating from Croppable Image 3 with versions prior to 1.1.7, please do this as a one time step: In the PW Admin, go to side -> modules -> new, use "install via ClassName" and use CroppableImage3 for the Module Class Name. This will update your existing CroppableImage3 module sub directory, even if it is called a new install. After that, the module will be recogniced by the PW updater module, what makes it a lot easier on further updates. ------------------------------------------------------------------------- For updating from the legacy Thumbnail / CropImage to CroppableImage3 read on here. -------------------------------------------------------------------------1 point
-
This module was already introduced in another thread yesterday, but since each module should have a thread of its own, here we go. Login Scheduler adds a couple of new fields to user template(s) and provides support for disabling login for non-superuser accounts either instantly (with a checkbox, "Login disabled") or by specifying a time range ("Login allowed starting from", "Login allowed until"). If a user is already logged in when login access is disabled, logout should be triggered during next session validity check (usually next page load). Starting from version 1.1.0, superuser accounts are not affected by this module at all. This is a safety mechanism and prevents you from locking yourself out of the whole system. You can grab this module from GitHub: https://github.com/teppokoivula/LoginScheduler.1 point
-
Hi, for a website I'm developing I was trying to use the PageTable field, but I can't seem to get it work. All access rights should be fine. The superuser & editor can add items. But only the superuser sees them. For some reason the editor role doesn't see them after they were added. I've found some posts back from 2015 with this issue, is this still a bug or is there already a fix? I'm having this issue with Processwire 3.1 point
-
The use cases are the same as those for any inputfield dependency: you want to show or require one field based on the state of another. This module just adds Image and File fields to the types of fields you can use in an inputfield dependency selector. Off the top of my head: you have an images field for an optional gallery and you want to remind the site editor to add a summary/introduction for the gallery if images are added. Also, there was this request for help. @szabesz is right - the screen recorder tool is LICEcap. I discovered it via this post by @bernhard.1 point
-
1 point
-
All your fields will be added directly to your template - Page fields and other fields. For the Page fields, it is the selectable options for the field that you will create as individual pages elsewhere in the tree. You could put these 'option' pages and their parents directly under the Home page, but I like to group them under a 'Selects' page to separate them from the rest of the site pages. Home Selects Make Toyota Volkswagen ... Color ... A couple of easy ways to create these pages: 1. Use adrian's great Page Field Select Creator module. This is good for when you want to include the ability to add pages (i.e. options for the select) via Pages > Add New because it will create dedicated templates for the option page and the parent page. The module creates the Page field for you. 2. When I don't need the use of the Add New feature and want to avoid unnecessary extra templates I use ImportPagesCSV with the "Paste in CSV Data" option. If all you need is the title then for example you would enter: title Toyota Volkswagen ... With this option you would create the Page field yourself and choose selectable pages, etc.1 point
-
@microcipcip....not sure if you know that a find call, e.g. $pages->find, p->children never returns hidden pages unless you declare include=hidden etc (@see here: http://processwire.com/api/selectors/#access_control1 point
-
@fliwatuet could you post the content of the head section of your _main.php please. It's fine to redact anything you feel is private if you need to. Also, I use this module on a PHP7 installation and seem to have no problems with it.1 point
-
I need the function because I need to use it in several places and I want to allow only certain search queries (otherwise someone may be able to see hidden pages or hidden fields). The array approach seems interesting, I'll have a look, thanks a lot for your help1 point
-
1 point
-
This is the first time that I'm going to post anything under the showcase forum, although I have a few ProcessWire powered websites under my belt. This one is special because I think the use case is somewhat unique. Caltex Loyalty Club - initial the situation Caltex Loyalty Club is a customer loyalty and rewards program of Caltex Palawan aimed to provide exciting promos and incentives their customers' continuous patronage. Caltex Palawan originally bought their system from a large software company that also provides card-based solutions. The previous system consist of the following: two high-end Dell servers that are located in two separate Caltex' offices traditional EFTPOS devices for reading loyalty cards MIfare RFID cards as loyalty cards Running within one of the Dell servers was a crude and barely usable loyalty/rewards manager application that runs the whole thing. Here's what I mean: You're free to imagine what the rest of the application looks like. The other dell server acts as a VPN server through which all the EFTPOS devices and the application server connect to. To cut the long story short, this setup was running smoothly for a total of 3 weeks before problems started popping up, mostly because VPN server did not have a static IP address and the EFTPOS devices could not connect. The developers refused to provide service to the system because Caltex Palawan does not want to shoulder the travel and boarding expenses of the developers (since it was just working 3 weeks). We were called in at this point (we being a local tech solutions provider in Puerto Princesa), and we made the VPN server work, but other problems soon surfaced. The whole system was barely working for about 3 years when they finally decided they were fed up with the customer complaints they keep getting everyday. Our Solution We studied the existing system for quite some time to examine where the problems we're coming from. The most obvious one we found was that because the servers were located inside Caltex Palawan's offices, the servers were prone to downtimes caused by power outages and internet connectivity problems. It was obvious that the better way would be a web-based solution that would always be online. We also wanted to replace the bulky and outdated EFTPOS devices with android based NFC device that are more portable, and easier to work with. We retained the cards that originally came with the system since there are thousands left unused, but eventually replaced them with NTAG stickers, and newer cards. To sum it up: A web-based application to manage the loyalty / rewards system Android based NFC device to read the loyalty cards NTAG stickers to act as loyalty cards ProcessWire to the Rescue Having used ProcessWire before, it was our best choice, after considering using Laravel, and other frameworks, because of ProcessWire's key strengths: all custom fields - no unnecessary bloat powerful api scalability Although this straight up looks like it's been lifted from processwire.com's front page, but this really is the case, and these are all we need from a web-application framework to do almost anything! All custom fields Since we are working with a unique dataset, it's impossible for us to find anything out there that would have anything even remotely close to what we need. In the beginning we were planning to use custom database tables that we would deploy alongside ProcessWire. I even posted one time in the forum, asking if there's any way to integrate an ORM library with ProcessWire, and the answer I got was that it would be redundant, and almost surely unnecessary. And this turned out exactly the case! When we designed our database (using ERDs), we we're delighted at how closely we were able to replicate our relational design using templates, fields, and pages. This is mainly due to FieldtypePage. We were able to create meaningful relationships within our templates. We ended up with ~60 templates and ~70 fields. Powerful API About 70% of our code are API calls. The rest are just control structures and simple computations. That's how powerful the ProcessWire API is. So powerful that we did not even need to write a single sql query to complete the whole project. We needed to handle user login, API has it. Session handling, API has it. Selecting and manipulating huge amount of interrelated data, the API has it! Scalability At the onset of the project, the existing CLC program already has some 20 thousand members with hundreds of thousands of transactions. Right now, our current system has around 500,000 pages and counting and were not experiencing any slowdown. How we used ProcessWire The first thing that we decided that our client would not be able to see the processwire admin page. We wanted to present them with a simplified UI that does not present them with anything they don't need. We created a whole frontend UI for the client to use. We had custom forms for all the pages that they can create, and all the actions that they can do. We, on the otherhand, use the admin backend thoroughly in continuously developing, and supporting the system. What the clients see vs what we see: Our setup ProcessWire 2.8 running on a LEMP stack DigitalOcean droplet AjentiV VPS manager Modules we used We used a very minimal amount of modules for the project: ImportPagesCSV - to import the data migrated from the old system FieldtypeDecimal - for all our decimal values Modified RestHelper - from clsource for all the communication between ProcessWire and our android POS app Modified PagesSum from esrch ProcessSelectorTest - for quickly checking some selections Things we had to do on our own Frontend user login Frontend password recovery Fine-grained permission handling for users Cron jobs for scheduled tasks. The rest are API calls, and business logic. The Result Our Caltex Loyalty Club web application is now running on its sixth month without so much as a hiccup! Compared to the previous system that was averaging 200 transactions per day, we are now getting 800 and it's growing. We are running 10 campaigns and promos simultaneously across 18 Caltex Stations all over Palawan, with 30 android NFC terminals communicating to a single ProcessWire installation. We are very happy with ProcessWire in terms of performance, ease of use, and most importantly it's simple and yet very powerful functionality as a web-application framework even though it doesn't primarily market itself as one. PS. Also one of the best things we experienced while doing this project is the awesome, unparalleled community support. Throughout the project, although we had a lot of moments when we just couldn't figure out what to do, never once did we have to ask a question in the forum. A quick search here and there, and someone already helped someone else that faced the same problem we were having. It's almost as if people are being paid to diligently answer all the questions! We most of the time just had to like an answer that was already there! Screenshots and photos Android POS terminals and CSR training1 point
-
@microcipcip - "selectorValue" as the sanitizer is correct so I don't see any issues with what you have done. I am curious though - are you using that getSelectors() function elsewhere, or just calling it the once? If just once there is no real advantage to making it a function. Also, you might find the array approach to selectors easier in this case. Have a read here: https://processwire.com/blog/posts/processwire-3.0.13-selector-upgrades-and-new-form-builder-version/#new-selectors-as-regular-arrays1 point
-
Just for the record: "I also tend to store additional properties in $page rather than creating global variables (e.g., $page->foo = 'bar' instead of $foo = 'bar'), which makes it a lot easier to use wireRenderFile(). As long as you pass in $page, you know you've got everything you need, and you can add more properties later without worrying about updating your "view bag."1 point
-
1 point
-
this one? https://github.com/ryancramerdesign/ProcessWire/issues/1257 Let's ping @arjen to ask for a status update on this issue.1 point
-
Sorry for inconvenience! I just realised that the whole directory was missing on github. I fixed that and also upgraded AS to v1.0.2 that add support for CroppableImage3.1 point
-
I like pocketgrid, too. No need for bloated css frameworks with endless features. Searched for alternatives (based on flexbox), but haven't really used one... http://leejordan.github.io/reflex/docs/index.html http://progressivered.com/fla/?d=0&v=1&h=1&s=0&i=000&a=000#features And a simple one (table based css grid). https://github.com/chrisnager/ungrid/1 point
-
This is working for me (PW 3.0.40)... /site/config.php $config->imageSizes = [ "foo" => ["width" => 200, "height" => 200], "bar" => ["width" => 400, "height" => 0], ]; /site/ready.php $this->addHookAfter('InputfieldFile::fileAdded', function($event) { $inputfield = $event->object; if($inputfield->name != 'images') return; // needs to match the name of your images field // alternatively, to use for all image fields... // if($inputfield->class != 'FieldtypeImage') return; $image = $event->argumentsByName("pagefile"); $sizes = isset($this->config->imageSizes) ? $this->config->imageSizes : []; if(count($sizes)) { foreach($sizes as $size) { $image->size($size["width"], $size["height"]); } } }); You won't see the variations immediately inside PageEdit, but you can see them after you save the page.1 point
-
Nice thanks for this great module! Don't have a use right now but I remember that I wished something like that some time ago, will for sure come in handy sooner or later1 point
-
Welcome to the forums @sreeb. Please have a look at this post (including the gists): Use one of those custom functions (or one of your own) and use PHP logic to throw in your data-dropdown-menu in the first <ul>1 point
-
You say you you are using form-upload.php and form-process.php from Soma, ok, lets simplify a bit the code for our example. Also we are going to create a template and a page. First step: we create a new file form-xml.php in the templates folder and copypasta the following code into this file : Second step: we create another new file _form-process.php in our templates folder (note: the underscore is here to avoid the file being listed as template found) and again we copypasta the following code into this file : Third step: we go in the backend, create a new template and choose (check) form-xml.php from the template found listing. Then we go to the page tree, create a page under root page, give the new page a title and we assign form-xml as template. The final step is to create the folder which hold our XML generated files. I set as arbitrary path - site/assets/XMLFILES - so we go in site/assets and create a folder with the following name: XMLFILES Now we can open our new page in the browser and play with the form generating XML file. Result: <?xml version="1.0"?> <user_profil> <username>root</username> <email>root@foo.bar</email> </user_profil>1 point
-
I have submited the Spanish es-ES for ProcessWire 3.0.x 100% Translated, if not, let me know. Pull requests, contributors,... are all welcome. http://modules.processwire.com/modules/pw_spanish/ Enjoy. .a1 point
-
I will post you an example later, i am on mobile right now.1 point
-
1 point
-
It seems you must define the multidimensional array in $config in a single statement: $config->imageSizes = [ "foo" => ["width" => 12, "height" => 34], "bar" => ["width" => 56, "height" => 78], ]; Someone else may know the reason for this.1 point
-
This looks great @horst - just one initial request - can we lose the "Wow that looks great" button label and make it simply "Continue" or "Accept" or something similar. And maybe the "Not happy, crop again" link should be a button with "Redo Crop" ? PS I know these labels are a legacy of the original thumbnails module, but they do sound a little weird to me.1 point
-
Try the develop branch of this module - it looks like it has been fixed there: https://github.com/justonestep/processwire-imageextra/blob/develop/ImageExtra.module#L1081 point
-
I'm currently short on time, but I noticed my date selection code in there and I've seen a better selector for that from ryan some time ago: // select anything overlapping the range of $start - $end $selector = "enddate>=$start, (enddate<=$end), (startdate<=$end)";1 point
-
Thanks again for the port to leaflet! I prefer OSM over google maps and have been using it for quite some time. Leaflet is very powerful and opens up many possibilities. I forked Mats' module and added support for leaflet-providers so we can choose different map tile providers (see my post here). It is still a work in progress but seems stable. Once it is ready for production I'll make a pull request. Mats, do you think we should use leaflet-providers as standard or offer the user a choice whether they want to use it or not? Next up I will add an icon field and support for Leaflet.awesome-markers.1 point
-
On the other hand, you could ignore Foundation entirely and go for something like Pocketgrid.1 point