Leaderboard
Popular Content
Showing content with the highest reputation on 08/25/2017 in all areas
-
This post is all about fieldsets in ProcessWire. Version 3.0.73 adds some nice UI upgrades when it comes to working with them. Plus we cover two new modules we have in development for managing groups of fields in fieldsets: https://processwire.com/blog/posts/processwire-3.0.73-and-new-fieldset-types/15 points
-
Writer Relocations is one of India's oldest and finest packing and moving companies. Their new website at has been developed using the flexible ProcessWire CMS by Pigtail Pundits. Writer Relocations is a 63-year-old company handles domestic India moves, international moving, fine art moving, commercial moving, and office moving. Its new site takes off from the 20 odd pages, originally housed on the Writer Corporation, the corporate website. ProcessWire has been the recommended CMS at Pigtail Pundits for close to 4 years now. Therefore PW was the natural choice for building this website. Premium PW plugins such as Form Builder, Profields, Autolinks, and ProCache were used as part of the build. The new site has over 120 pages of content, most of which has been rewritten from scratch and revisualized according to modern website practices. The real challenge on this project was research and the tone of its communications. Since the site was launched it has been steadily streaming in new leads every day for the client.11 points
-
Each repeater item is a page itself, and repeater field is the parent page that holds these. (You can even see it under Admin>Repeaters). You need to iterate over $page->studioImages to get each set, than iterate over them to get individual images. Here's how: <?php foreach ($page->studioImages as $imgSet): // each repeater item ?> <div class="swiper-slide"> <div class="image-gallery"> <?php foreach ($imgSet->studio as $img): // each image in a repeater item ?> <a href="<?= $img->url ?>"> <div style="background-image: url(<?= $img->url ?>)"></div> </a> <?php endforeach; ?> </div> </div> <?php endforeach; ?>6 points
-
A couple of new tutorials: https://webdesign.tutsplus.com/tutorials/processwire-admin-theme-strategies--cms-29244 https://digitalardor.com/articles/basic-setup-for-content-blocks-in-processwire/ and a Slant list showing PW as the best PHP CMS with currently no down votes https://www.slant.co/topics/5409/~php-cms6 points
-
I boosted it with +1s and one more Pro: "PRO Fast without caching, small footprint (less than 2000 files) for a full featured CMS/CMF. You can optionally use Composer but you are not forced to. Upgrading can be done via the admin and it is a very easy process. Security is exceptional, no hacking incidents have been reported so far." You guys might want to go there to agree5 points
-
4 points
-
Here's a mixin I put together for creating hamburger icons. It utilizes the checkbox hack so you can use CSS only to show a mobile menu (or off-canvas menu, etc). Unlike other mixins here you can specify a selector for the label tag if it's not directly below the checkbox, so the label (the icon) can be placed anywhere in the DOM. There is also a "hamburger_tint" helper mixin included to easily colorize the icon/text on hover or in a checked state. Parameters: width: the width of the icon. default: 32px thickness: the thickness of the bars. default: 3px gap: the vertical space between the bars. Overall height is: thickness*3 + gap*2. default: 7px color: the color of the icons. default: #000 (black) radius: border-radius value to round edges. default: 0 anim: seconds of animation duration (transition-duration) or timing function + duration (eg. "ease-out 0.3s"). Use -1 to disable morphing to an "X". default:0.25s labelselector: in case the label is not right after the checkbox, use this setting to tell the mixin where to find it. Eg. "~ div.content header nav label". default: "+ label" padding: extra spacing around the icon. default: 0 text: show text next to the icon, by default on the right. Values: "left" or false to disable. Requires an extra "span" tag. default: "right" CodePen demo GitHub4 points
-
One of the most obvious uses of this is I can finally make my own bunch of SEO fields and apply them to multiple pages. SEO is a core part of every site I develop and MarkupSEO just isn't getting the development it requires.3 points
-
3 points
-
Have a look at Show If/Inpufield Dependencies https://processwire.com/api/selectors/inputfield-dependencies/2 points
-
2 points
-
This week's post is actually last week's post, just updated with a lot of new content. Since the topic is pretty much the same as last week, I thought it fit better this way. We've continued to make a ton of progress with the export/import features over the last week, and it's all covered in the updated blog post here: https://processwire.com/blog/posts/processwire-3.0.71-adds-new-core-module/1 point
-
It sounds to me like things are being lost in the redirect to Paypal and back. Paypal should return most things back to you so you can grab them again. What I do is create and populate a PW page with the user's details, submit them to Paypal for payment, and then on return I can look up the user by an ID that I assign to them (stored in their page and also sent to Paypal). With that I can update their page with the payment details (verification of payment, etc). This of course does result in some entries which weren't finalized - sometimes people choose to back out at the last minute, but at least you have more info on this. Also, getting OT here, but are you making use of Paypal's IPN system (https://github.com/paypal/ipn-code-samples/blob/master/php/PaypalIPN.php) to verify payment?1 point
-
@ryan I'm curious did you read my ramblings in the wishlist topic (and elsewhere when the topic poped up)?1 point
-
finally: https://processwire.com/blog/posts/processwire-3.0.73-and-new-fieldset-types/1 point
-
1 point
-
@Baldur2630 Moderator Note: I sympathise with your predicament and acknowledge your frustration. However, your site seems to be a Joomla website and I have not seen any indication that you intend to transfer your site to ProcessWire. As these are ProcessWire forums, we need to stick to ProcessWire-related themes. However, given your predicament, and that there are members who have been trying to help you already, rather than interfere with the conversation, in the interim, I'll move this topic to Dev Talk.1 point
-
Think t Just making sure. Think maybe there may be some mileage in http://schema.org/MusicRecording as well.1 point
-
I dont think search engines care about keywords anymore. This leaves you title, description and page content to attract visitors. https://webmasters.googleblog.com/2009/09/google-does-not-use-keywords-meta-tag.html https://blog.kissmetrics.com/meta-description-magic/ When you fill those fields, they show up on the page correctly, but how they work against other links is another question. <!DOCTYPE html> <html dir="ltr" lang="en-gb"> <head> <meta name="keywords" content="Always On My Mind, Apache, Beethoven's 5th, By The Time I Get To Phoenix, Dream Theatre - Best of Times, Fandango, Nights In White Satin, Phantom Of The Opera, Rave On, Skyfall, That'll Be The Day, The Loner, Walk Don't Run, You Raise Me Up" /> <meta name="author" content="Administrator" /> <meta name="description" content="Volume 1 of Backing Tracks and Musical Notation plus Guitar Tabs for popular songs and instrumentals" /> <title>Trax-n-tabs - Wolf Trax - Vol 01</title> <!-- ... -->1 point
-
Oh sorry my fault.. my table modules in the db had no structure and all the new modules could'nt get an ID.. sorry for that. Now it works It happened when i repaired the database:1 point
-
Sorry, I'm still not able to reproduce this error. Like @abdus mentioned, try in a browser that doesn't have browser addons or extensions. Try on another computer if the website is already public. Try on a fresh PW install and see if it still does it. Try editing the page with a different admin theme. I'm using the default admin theme when I test. Make sure your modules are up to date.1 point
-
I'm still betting on cache. Modules.info cache holds information about which modules are installed. Mine looks like this: // Modules.info cache { "148": { "name": "AdminThemeDefault", "title": "Default", "version": 14, "autoload": "template=admin", "created": 1502621954, "configurable": 19, "namespace": "ProcessWire\\" }, "97": { "name": "FieldtypeCheckbox", "title": "Checkbox", "version": 101, "singular": 1, "created": 1502621954, "namespace": "ProcessWire\\", "permanent": true }, // ... } Try assigning an empty array to $config->preloadCacheNames in config.php to disable reading from module cache, and even manually removing Modules.info from caches table in DB. /** * Cache names to preload * * Consists of the cache name/token for any caches that we want to be preloaded at boot time. * This is an optimization that can reduce some database overhead. * * @var array * */ $config->preloadCacheNames = array( 'Modules.info', //'ModulesVerbose.info', 'ModulesVersions.info', 'Modules.wire/modules/', 'Modules.site/modules/', );1 point
-
Clearing module cache usually helps Here's the relevant part from PW core. // ProcessModule.module protected function renderEdit($moduleName, $moduleInfo) { // ... $moduleId = $this->modules->getModuleID($moduleName); // ... if(!$moduleId) { $this->error("Unknown module"); return $this->session->redirect('./'); } // ... } And getModuleID() method: // Modules.php public function getModuleID($class) { $id = 0; if(is_object($class)) { if($class instanceof Module) { $class = $this->getModuleClass($class); } else { // Class is not a module return $id; } } if(isset($this->moduleIDs[$class])) { $id = (int) $this->moduleIDs[$class]; } else foreach($this->moduleInfoCache as $key => $info) { if($info['name'] == $class) { $id = (int) $key; break; } } return $id; } If PW cannot get the module from the cache, it returns 0, which sets of the error you're receiving.1 point
-
Hi @helmut2509 Change user language in profile, then all title of pages will be in german.1 point
-
1 point
-
I am sorry to hear that. Don't let it discourage you from doing what you love. As for the website, it is using Joomla with a custom module (MyMuse). If it were vanilla Joomla, it would probably be easier, as most modern CMSs allow you to easily change templates as you see fit, and it's all well documented. But modifying a custom module, unless it's very popular might be daunting to someone with no expertise. I assumed you were thinking of transferring your system to PW, so I recommended some points to start off your research. Although it's not a quick solution, and it may sound like I'm preaching, but in the long run it might prove less costly to switch to a system that allows you and any developers you might hire to easily change the wesite to suit your needs.1 point
-
Rewrite Base isn't active by default in PW htaccess. # RewriteBase / While my hoster is fine with it, on some servers I have to enable it to make rewrite work.1 point
-
This works perfectly, thank you for your explanation! Now I understand how repeaters work.1 point
-
@szabesz and @gmclelland Thank you for tests. Of course, I have tried different versions of PW with and without multi language support in Opera, Chrome and IE Currently, I was able to track it down to this: 1. Create image field. 2. Set default image grid mode to square grid images ( it set by default ) and create page with this template/field 3. When the page loads there no indication that some type of grid is selected. 4. Try to rename image and you get this js error. Then if you choose any of image grid you will be able to rename the image. Could you please check this behavior?1 point
-
1 point
-
W7 and newer have extra protections on certain stuff. Just being an administrator user on your windows is really a "mostly" administrator user, but to edit hosts (and other protected system files) you need to explicitly tick "run as administrator" in the program you're using to access the file. For me, I created a desktop shortcut ot file explorer, in the shortcut properties tick "run as administrator" after navigating to hosts file open it with notepad from within file explorer. FWIW, being linux-oriented and using both windows and linux to edit websites, on w10 I installed xampp, cygwin for ssh server on win, geany (which is available on both win and linux), and git for windows https://git-scm.com/download/win I don't use github though, I use git for my own private git repository I set up running on a Digital Ocean CentOS droplet. I live pretty much in the command line, and this setup allows me to use pretty much the same cli from either windows or linux.1 point
-
Pages::setupNew won't work for this because the page doesn't exist yet when you try to sort it to the first (0) position.1 point
-
It's been a while and i share my first results: 1) Make some pages with FieldtypeMapMarker 2) Build a form with an input for the Zipcode/PLZ and a select for the radius. 3) upload the .tab file in your template (german zipcodes) tomorrow i will make the styling and getting the distance between plz and results and render the google maps. code: define("OGDB_LOCAL_DATA_FILE","./PLZ.tab"); function plztolatlong($plz) { $fileData = @file_get_contents(OGDB_LOCAL_DATA_FILE); if ( $fileData == FALSE ) { die("ABBRUCH: konnte Daten nicht laden (".OGDB_LOCAL_DATA_FILE.")\n"); } $fileData = explode("\n",$fileData); for ( $i=1; $i < count($fileData); $i++ ) { $fileRow = explode("\t",$fileData[$i]); if ( $plz == $fileRow[1] ) { $origin_lon = $fileRow[2]; $origin_lat = $fileRow[3]; $city = $fileRow[4]; } }; $out['lat'] = $origin_lat; $out['lon'] = $origin_lon; $out['city'] = $city; return $out; } $distance = $input->post->radius; // Get distance $plz = $input->post->plz; // Get PLZ $getlatlng = plztolatlong($plz); // plz to lat and long $lat = $getlatlng['lat']; // just for test reasons later $lng = $getlatlng['lon']; // just for test reasons later echo "<pre>"; print_r($getlatlng); echo "</pre>"; echo "LAT: " . $lat . "<br />"; echo "LONG: " . $lng . "<br />"; $radius = 6371; // earth's radius in km = ~6371 // latitude boundaries $maxlat = $lat + rad2deg($distance / $radius); $maxlat = str_replace(',', '.', $maxlat); $minlat = $lat - rad2deg($distance / $radius); $minlat = str_replace(',', '.', $minlat); // longitude boundaries (longitude gets smaller when latitude increases) $maxlng = $lng + rad2deg($distance / $radius / cos(deg2rad($lat))); $maxlng = str_replace(',', '.', $maxlng); $minlng = $lng - rad2deg($distance / $radius / cos(deg2rad($lat))); $minlng = str_replace(',', '.', $minlng); $q = "template=filialen, mapfield.lat>=$minlat, mapfield.lat<=$maxlat, mapfield.lng>=$minlng, mapfield.lng<=$maxlng"; $results = $pages->find($q); echo "<h2>Ergebnisse</h2>"; foreach($results as $r) { echo "<h3>{$r->title}</h3>"; echo "<p>{$r->mapfield->adress}</p>"; echo "<p>{$r->filial_tel}</p>"; echo "<p>{$r->filial_mail}</p>"; echo "<p>{$r->filial_www}</p>"; } echo $ff; FILES: PLZ.tab1 point
-
I've updated the pens, now it is possible to add padding and show text too (left or right side).1 point
-
Just pushed a new version which has the following improvements: Console panel calls now process /site/ready.php and /site/finished.php (along with /site/init.php which already worked) - thanks to @bernhard for help testing this. Captain Hook panel now sorts hooks alphabetically within each file/class, rather than the old order by line number in the file - this makes it much easier to browse. Updates to Ace editor (used in the console panel) and the Tracy core. Some other tweaks. Cheers!1 point
-
Update: Menu Builder Version 0.2.0. Changelog Modified 'current_class_level' option to apply 'current_class' to a menu item when viewing any of its descendant child pages (child, grandchild, etc.) in cases where those descendant pages are neither part of the menu nor included via 'include_children'. To enable this, set 'current_class_level' to '0'. Thanks @Mike Rockett for reviving this. Note I have tested this thoroughly but sometimes in Multilingual sites, depending on some conditions I am yet to pin down, the setting does not work properly. In such cases, using 'current_class_level' >= what you need does the trick. Please test and let me know. In dev branch for now.1 point
-
I've done some websites with fractal directly using the style guide templates (twig) from within processwire. I've written a (german) medium post about it: https://medium.com/webdevs/living-styleguide-mit-fractal-und-processwire-e900f05e0b79 But I'm sure with recent updates to fractal stuff might no longer work exactly as explained. Overall it's been a nice experience to try it and for larger organisations / projects I'd expect it to make more sense. Our projects were kinda smallish and we're two people, so the overhead seemed to be a lot. As all templates came from the style guide I had to have all different versions of pages in it, so it's really easy to communicate with people, as you can view all of them in the style guide without actually having the real website in that state or getting it there locally (the website had different stages for an event registration).1 point
-
Hello @dragan, happy to hear that you find this tutorial useful. At the time of writing this tutorial I didn't knew how easy you can output your own JSON without a module. Currently I don't need the Pages2JSON module anymore, but instead output the JSON inside my search template like this: <?php if ($config->ajax) { $selector = [ "title|and|more|fields%=" => "", "template!=" => ["templates", "to", "exclude"], "has_parent!=" => 2 ]; $matches = $pages->find($selector); $results = array(); foreach ($matches as $match) { $result = array( "title" => htmlspecialchars_decode($match->title), "url" => $match->url ); $results[] = $result; } header("Content-Type: application/json"); echo json_encode($results); return $this->halt(); } else { // Your regular template This way you build your own array with all necessary keys and then encode them as JSON. Regards, Andreas1 point
-
$field = []; $childrenByField =[]; foreach($children as $child) { $tableCount = count($child->prod_vid_bandwidth); if($tableCount>0) { foreach($child->prod_vid_bandwidth as $item) { $value = number_format($item->band_lo,1,'.',''); $field[$value][] = $child; } } } foreach($field as $f => $items) { $childrenByField[] = "$f"; } if(!empty($childrenByField)) $prod_vid_bandwidth_lo = implode(" OR ", $childrenByField); $field = []; $childrenByField =[]; foreach($children as $child) { $tableCount = count($child->prod_vid_bandwidth); if($tableCount>0) { foreach($child->prod_vid_bandwidth as $item) { $field[$item->lo_unit][] = $child; } }} foreach($field as $f => $items) { $childrenByField[] = "$f"; } if(!empty($childrenByField)) $prod_vid_bandwidth_loU = implode(" OR ", $childrenByField); $field = []; $childrenByField =[]; foreach($children as $child) { $tableCount = count($child->prod_vid_bandwidth); if($tableCount>0) { foreach($child->prod_vid_bandwidth as $item) { $value = number_format($item->band_hi,1,'.',''); $field[$value][] = $child; } }} foreach($field as $f => $items) { $childrenByField[] = "$f"; } if(!empty($childrenByField)) $prod_vid_bandwidth_hi = implode(" OR ", $childrenByField); $field = []; $childrenByField =[]; foreach($children as $child) { $tableCount = count($child->prod_vid_bandwidth); if($tableCount>0) { foreach($child->prod_vid_bandwidth as $item) { $field[$item->hi_unit][] = $child; } }} foreach($field as $f => $items) { $childrenByField[] = "$f"; } if(!empty($childrenByField)) $prod_vid_bandwidth_hiU = implode(" OR ", $childrenByField); unset($tableCount); Here's the code that finally output my table fields. Note that my floats were being converted to integers so I had to force the display of their decimal places with number_format(). Originally, I hoped to cycle through the fields and output standardized strings of HTML based on their type and structure, but in the end I am omitting too many fields, and need to specialize the output code a little too much to make that feasible. So I am working my way through 170 fields, but hopefully this will put me ahead in this project when I'm done (toward integrating a Pages2PDF tie-in from these fields later), rather than being as behind as I feel! Thanks so much to everyone who chimed in to give me a hand!1 point
-
1 point
-
@everyone : More beta-tester needed ! If you have a bit time, a local or staging web server - feel free to test it on a prod server - and you want to try this module, please send me a private message ! This module can't harm your server It can be tested on the following ProcessWire version: 2.7.2 (no Composer here) 2.8.x 3.0.x @Ivan Gretsky wanna test it ?1 point
-
I think I get it now. You want to group children by values of a column Something like this one works: So this code $parent = $pages->get(1017); $groupedByLow = []; foreach($parent->children as $child) { foreach($child->prod_vid_bandwidth as $item) { $groupedByLow[$item->band_lo][] = $child->name; } } ksort($groupedByLow); // sort by band_lo dump($groupedByLow); Groups children like this (I used name field for presentation) array (3) 10 => array (1) 0 => "new-car" (7) 20 => array (2) 0 => "old-car" (7) 1 => "new-car" (7) 60 => array (1) 0 => "old-car" (7) You may need to check for null inside the second foreach.1 point
-
PW featured in the article "10+ Free Alternative Open Source CMS Tools to Explore". https://designmodo.com/free-cms/1 point
-
https://processwire.com/talk/topic/2047-group-by/#comment-19162 Got it somewhat working. <?php $pa = $pages->find("has_parent=/promos/"); $groups = array(); foreach($pa as $p) $groups["$p->podcast_shows"][] = $p->id;?> <?php echo "<ul>"; foreach($groups as $key => $gr){ $count = count($gr); echo "<li>$key"; if($count){ echo "<ul>"; foreach($gr as $key => $pid){ $r = $pages->get($pid); echo "<a href='$r->url'>$r->title</a>"; } echo "</ul>"; } echo "</li>"; } echo "</ul>";?> The problem is this line echo "<li>$key"; It shows the page ID and I need to show the title. I tried '$key->title' and that didn't work.1 point
-
I can surely see the need / desire for such a feature, but conceptually groups aren't really the way to handle this in ProcessWire. We already have a way to group fields and have access control on them and stuff. They are called templates. To accomplish what you're asking for I'd rather suggest we need a page field, which would act kinda like a repeater and (automatically) create a new page with one-to-one mapping to the current. And it would need to simply add fields to the page edit UI like the repeater does, but without the actual repeating part. Just the "repeater-like" setup should be changed to be handled like it's done for pagetables by using "real" templates. This way all existing tools/workflows and core handling can stay the same, but things like seo fields can still be shared with different pages.1 point
-
https://github.com/ryancramerdesign/ProcessWire/tree/master/wire/core Files starting DatabaseQuery...1 point