Leaderboard
Popular Content
Showing content with the highest reputation on 04/20/2014 in all areas
-
So as horst says in that post I linked to, 5.5.10 is your problem. You can either upgrade to 5.5.11 or implement one of the fixes he describes. These fixes will be available in the dev version of PW shortly: https://github.com/ryancramerdesign/ProcessWire/pull/4453 points
-
Wanze. Thanks for sharing this (and to Reno for asking the question!)! Everyday I continue to be awestruck by the simplicity, cleverness and power of ProcessWire. With about 11 easy-to-follow lines of code, without touching the core, without bashing the system into submission by throwing all sorts of plugins at it and without compromising security and future updates, this opens up a whole new world of possibilities all at the drop of a hat.....Fantastic!3 points
-
Nico, I'm sorry but still didn't have much time to look into this. I'll try to do it later today. I will merge your version since it works well with 2.4, and that's the most important anyway. We can try to fix the details I mentioned later. Thanks for working on this3 points
-
Can I ask about the app for a sec - what's the benefit over a fully functional mobile admin theme? The API makes an app easier to accomplish than in many other systems but unless there's a clear advantage I'm not sure I see the point to be honest.3 points
-
Hi reno, I think it is doable with two hooks. One hook would return false for Page::viewable() for the ProcessPageList page. Another Hook can be used to redirect your users to a custom admin page after login. I've only used the second one in a project, but I think something like this should work: // This needs to be an autoload module public function init() { $this->addHookBefore('ProcessHome::execute', $this, 'rootPage'); $this->addHookAfter('Page::viewable', $this, 'viewable'); } /** * Redirect users with custom-role to another page after login */ public function rootPage(HookEvent $event) { if ($this->user->hasRole('custom-role')) { $this->session->redirect('custom-admin-page/'); } } /** * Don't give users with custom-role access to Pages page */ public function viewable(HookEvent $event) { $page = $event->object; $user = $this->user; if ($page->id == 3 && $user->hasRole('custom-role') { $event->return = false; } }3 points
-
Hey, I forked this project and created a version which is a lot simpler but only runs on PW 2.4 or higher. https://github.com/NicoKnoll/pw-admin-custom-pages What do you think? @diogo Maybe you can merge them somehow and move your version in an "PW lower than 2.4" folder or so.3 points
-
So, I accepted Nico's pull request, and his changes are now in the master branch. If someone wants the previous versions, they are in the "pre-nico" and "pre-nico-dev" branches2 points
-
if you need some more examples,i posted 2 gists from a site i made: https://gist.github.com/outflux3/5690429 https://gist.github.com/outflux3/5690423 these should be pretty obvious and provide enough different examples to get you going with setting up the search form, search processor, and search results;2 points
-
Hey PhotoWebMax, here are some photography sites build with pw: http://processwire.com/about/sites/categories/photography/ According to some points here in the posts it sounds to me that it would be the best way for you to upload your photoshop images in the size you want to show them in your gallery. This way you can call the original images and resizing isn't needed. The other thing is, if you use Thumbnails module together with PageImage Manipulator, you have visual control over the quality and sharpening of the thumbnails.2 points
-
I'm importing data from the freebase.com database and having some troubles with 4 byte characters. SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x92\x93\xF0\x9F...' for column 'data' at row 1 Doing some research i found out the database fields that use now utf8_general_ci collation all need to be utf8mb4_unicode_ci. But also the connection needs utf8mb4 and SET NAMES need to be utf8mb4. mysql_query("SET CHARACTER SET utf8mb4"); mysql_query("SET NAMES utf8mb4"); 1) Would ProcessWire (PDO) be able to make connection with these settings? There is a setting for this in the config but there its mentioned its depricated. Seems the PDO by default SET NAMES utf8 From the config file: /** * Optional 'set names utf8' for sites that need it (this option is deprecated) * * This may be used instead of the $config->dbCharset = 'utf8' option, and exists here only for * backwards compatibility with existing installations. Otherwise, this option is deprecated. * * $config->dbSetNamesUTF8 = true; * */ $config->dbSetNamesUTF8 = true; /** * Optional DB socket config for sites that need it (for most you should exclude this) * * $config->dbSocket = ''; * */ 2) I have ProcessWire installed, would it be possible to convert it from utf8_general_ci to utf8mb4_unicode_ci I found this in the config file that is located in the wire folder: /** * Database character set. utf8 recommended. * * Note that you should probably not add/change this on an existing site. i.e. don't add this to * an existing ProcessWire installation without asking how in the ProcessWire forums. * */ $config->dbCharset = 'utf8'; Probably need to change this to utf8mb4 then but as it mentions i should ask here, does anybody have some more information what to do to make this work? Edit: At the moment i converted the database and fields by modifying the mysql export and re-importing it again. Now it has: CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci1 point
-
Warning: Still a work-in-progress. Still has quite a lot to be done. At Tom Reno's request I started work on a module that allows you to setup various watches on fields in your PW installation. You get to choose a field and can then specify when a change to the watched field should trigger a notification email to various interested parties. Pictures might help, so here we go... I intend adding a further restriction so fields in certain templates can be watched.1 point
-
I recently completed a website that had a very large gallery requiring multiple albums (categories) and 100+ images per album with pagination. The solution I developed accomplishes this with just 2 templates (gallery-index and gallery-album) and a single multi-image field for each album, allowing for quick, mass upload of images*. One of the great things about ProcessWire is that you can custom build something like an image gallery with just the tools that the template system and API provide out of the box, without going in search of modules. Once we have the basic templates set up, we will use the excellent FancyBox jQuery script/plugin to add some slick Javascript "lightbox" functionality on top of it. The gallery will still work without FancyBox or with Javascript disabled; it will simply fall back to opening each image in a blank page. So, without further ado... 1. Create a file named gallery-index.php in your site/templates/ folder with the following code. This will be the main page of your gallery. The code simply loops through all of the photo albums that are children of your main gallery page and uses the first image in the album as the cover photo: <? include("./head.inc") ?> <? // Configure thumbnail width/height $thumbWidth = 250; $thumbHeight = 250; // Create an array of the child pages that use the gallery-album template $albums = $page->children('template=gallery-album'); ?> <h2><?= $page->title ?></h2> <div class="gallery"> <ul class="gallery-row row"> <? if(count($albums) > 0) { foreach($albums as $album) { // Grab the first image from the album and create a thumbnail of it $thumb = $album->images->first()->size($thumbWidth, $thumbHeight); ?> <li class="col span4"> <div class="gallery-album photoShadow"> <a href="<?= $album->url ?>" class="gallery-albumThumb" title="<?= $album->title ?>"> <img src="<?= $thumb->url ?>" alt="<?= $thumb->description ?>" /> <h4 class="gallery-albumTitle"><?= $album->title ?></h4> </a> </div><!-- /gallery-album --> </li><!-- /col --> <? } } ?> </ul><!-- /gallery-row --> </div><!-- /gallery --> <? include("./foot.inc") ?> 2. Add the gallery-index template in the ProcessWire admin under Setup->Templates. This template does not require any fields, although you may want to add a body field for outputting additional content to the page. 3. Create a file named gallery-album.php in your site/templates/ folder. This template will be used to both hold and display the images in your albums. Here we will be loading the fancybox plugin as well, so make sure you've downloaded it here: http://fancyapps.com/fancybox/ and uploaded the /fancybox/ folder to your site/templates/scripts/ folder. We are appending the fancybox files to the $config->scripts and $config->styles array before outputting them in our head.inc file so that we're only loading that code on the album pages. So make sure you are outputting those arrays in the <head></head> section of your head.inc file along with your other scripts & styles, like so: <? foreach($config->scripts as $file) { ?><script type="text/javascript" src="<?= $file ?>"></script> <? } ?> <? foreach($config->styles as $file) { ?><link rel="stylesheet" type="text/css" href="<?= $file ?>" /> <? } ?> Please note that you will also have to include jQuery in your head.inc file before your other scripts, if you're not already including it. So here is our gallery-album.php. Notice also that we are calling the FancyBox script and customizing some of its options at the bottom of the file: <? $config->styles->append($config->urls->templates . "scripts/fancybox/jquery.fancybox.css"); $config->styles->append($config->urls->templates . "scripts/fancybox/helpers/jquery.fancybox-thumbs.css?v=1.0.7"); $config->scripts->append($config->urls->templates . "scripts/fancybox/jquery.fancybox.pack.js"); $config->scripts->append($config->urls->templates . "scripts/fancybox/helpers/jquery.fancybox-thumbs.js?v=1.0.7"); // Configure thumbnail width/height & number of photos to display per page $thumbWidth = 150; $thumbHeight = 150; $imagesPerPage = 32; // Make ProcessWire pagination work on the images field (see for full explanation of this) $start = ($input->pageNum - 1) * $imagesPerPage; $total = count($page->images); $images = $page->images->slice($start, $imagesPerPage); // Create a new pageArray to give MarkupPagerNav what it needs $a = new PageArray(); // Add in some generic placeholder pages foreach($images as $unused) $a->add(new Page()); // Tell the PageArray some details it needs for pagination $a->setTotal($total); $a->setLimit($imagesPerPage); $a->setStart($start); include("./head.inc") ?> <?= $a->renderPager() ?> <div class="upOneLevel"><a href="<?= $page->parent->url ?>">← Albums</a></div> <h2><?= $page->title ?></h2> <div class="album"> <ul class="album-row row"> <? if(count($images) > 0) { foreach($images as $image) { $thumb = $image->size($thumbWidth, $thumbHeight); ?> <li class="album-photo darkenOnHover col span3"> <a href="<?= $image->url ?>" rel="fancybox-gallery" class="fancybox" title="<?= $image->description ?>"> <img src="<?= $thumb->url ?>" alt="<?= $thumb->description ?>" /> <!-- Uncomment this line if you want descriptions under images <p class="album-photoDescription"><?= $image->description ?></p>--> </a> </li> <? } } ?> </ul><!-- /album-row --> </div><!-- /album --> <div class="group"><?= $a->renderPager() ?></div> <script type="text/javascript"> $(document).ready(function() { $(".fancybox").fancybox({ prevEffect : 'elastic', nextEffect : 'elastic', loop : false, mouseWheel: true, helpers : { title : { type: 'outside' }, thumbs : { width : 100, height : 60 } } }); }); </script> <? include("./foot.inc") ?> 4. As we did before, add the gallery-album template in the ProcessWire admin. Assign the images field to it, and go into the URLs tab and make sure Page Numbers are allowed. 5. Create a page in the ProcessWire admin for the gallery index using the gallery-index template. You'll probably want to give it a title like "Gallery". 6. Underneath your Gallery page, create child pages that use the gallery-album template, one page for each album you want to create. Name them however you'd like. 7. Go into each album page you created and populate the Images field with your images. Just drag-and-drop. It's as simple as that! If you want to add a description for each image, you can also add it here. If you have more than 32 images (or whatever value you set the $imagesPerPage variable to), the pagination will kick in and split the album into multiple pages. 8. Finally, add in the CSS. The CSS is really up to you, but I'm including a good starting point below. This includes a handy responsive grid system I built for my sites, as well as a .photoShadow class I developed which gives your album covers a cool 3D Polaroid look using pure CSS. /********* Helper Classes **********/ .row:after, .group:after { content: ""; display: block; height: 0; clear: both; visibility: hidden; } .row { ; /* Remove left gutter */ margin-top: 0; margin-right: 0; margin-bottom: 0; padding: 0; zoom: 1; /* IE7 */ position: relative; } .col { display: block; float:left; margin-left: 2%; /* Gutter size */ margin-top: 0; margin-right: 0; margin-bottom: 0; padding: 0; zoom: 1; width: 95.99999999996%; } .span1 {width: 6.33333333333%;} .span2 {width: 14.66666666666%;} .span3 {width: 22.99999999999%;} .span4 {width: 31.33333333332%;} .span5 {width: 39.66666666665%;} .span6 {width: 47.99999999998%;} .span7 {width: 56.33333333331%;} .span8 {width: 64.66666666664%;} .span9 {width: 72.99999999997%;} .span10 {width: 81.3333333333%;} .span11 {width: 89.66666666663%;} .span12 {width: 97.99999999996%;} .photoShadow { position: relative; border: 5px solid #fff; background: #fff; -moz-box-shadow: 0px 0px 2px #ccc; -o-box-shadow: 0px 0px 2px #ccc; -webkit-box-shadow: 0px 0px 2px #ccc; -ms-box-shadow: 0px 0px 2px #ccc; box-shadow: 0px 0px 2px #ccc; } .photoShadow:before { z-index: -1; content: ""; display: block; position: absolute; width: 104%; height: 16px; bottom: -5%; left: -2%; overflow: hidden; border-radius: 50% 50% 0 0; box-shadow: inset 0px 8px 5px #999; } .darkenOnHover { opacity: .8; -webkit-transition: opacity .2s; -moz-transition: opacity .2s; -ms-transition: opacity .2s; -o-transition: opacity .2s; transition: opacity .2s; } .darkenOnHover:hover { opacity: 1; -webkit-transition: opacity .1s; -moz-transition: opacity .1s; -ms-transition: opacity .1s; -o-transition: opacity .1s; transition: opacity .1s; } /********** Blocks **********/ .gallery { } .gallery-album a:hover { text-decoration: none; } .gallery-albumTitle { font-size: 1.1em; text-align: center; margin: .2em ; } .gallery-album { -webkit-transition: all .2s; -moz-transition: all .2s; -ms-transition: all .2s; -o-transition: all .2s; transition: all .2s; } .gallery-album:hover { -webkit-transition: all .2s; -moz-transition: all .2s; -ms-transition: all .2s; -o-transition: all .2s; transition: all .2s; -webkit-box-shadow: 0 0 3px #555; -moz-box-shadow: 0 0 3px #555; -ms-box-shadow: 0 0 3px #555; -o-box-shadow: 0 0 3px #555; box-shadow: 0 0 3px #555; } .album-photo img { margin-bottom: 6px; border: 1px solid #ddd; } .upOneLevel { font-size: 1.1em; margin-bottom: .4em; } .upOneLevel .icon-circle-arrow-left { font-size: 1.5em; margin-right: .4em; } .upOneLevel a:hover { text-decoration: none; } .MarkupPagerNav { margin: 1em 0; font-family: Arial, sans-serif; float: right; } .MarkupPagerNav li { float: left; list-style: none; margin: 0; } .MarkupPagerNav li a, .MarkupPagerNav li.MarkupPagerNavSeparator { display: block; float: left; padding: 2px 9px; color: #fff; background: #2f4248; margin-left: 3px; font-size: 10px; font-weight: bold; text-transform: uppercase; } .MarkupPagerNav li.MarkupPagerNavOn a, .MarkupPagerNav li a:hover { color: #fff; background: #db1174; text-decoration: none; } .MarkupPagerNav li.MarkupPagerNavSeparator { display: inline; color: #777; background: #d2e4ea; padding-left: 3px; padding-right: 3px; } I think that's it! Just make sure you're including the CSS file in your head.inc inside the <head></head> tags and you should be all set. If you come across any issues trying to implement the above (or find any of it confusing) please let me know below. Everyone is coming from different backgrounds and different experience levels. And if you find this tutorial useful, please feel free to let me know as well * I should mention that although it is possible to create galleries in Processwire where each image is represented by its own page (and, as Ryan has mentioned, is often preferable since it is ultimately more scalable), sometimes the ease of using a single image field (which can upload and decompress zip files of images in mass) simply outweighs any drawbacks. If I had to create this gallery with the 1-image-per-page method, it would have taken hours to upload all of the images one-by-one without some sort of additional programming to automate the process.1 point
-
Hey, I guess we all used another CMS before switching to ProcessWire. And I guess everyone probably liked some bigger or smaller features of their old CMS. To close this gap or to replace this loss as good as possible it would be nice to collect a list of this features here. Probably there are things that can't be realized with ProcessWire the way you liked it in your other CMS. But always remember: Impossible is Nothing. #processwire My personal list is/was: Textpattern: - how to install a language (but I fixed that today https://processwire.com/talk/topic/6154-changes-in-how-to-add-a-language/#entry60210) WordPress: - it has a app (Tumblr got one, too) - preview function - switch themes (and the new browsing themes stuff: http://premium.wpmudev.org/blog/wp-content/uploads/2014/01/wordpress-themes-experience.png) (and live preview of themes) - theme / admin settings (page title, subtitle) in a special place - shortlinks - automatic updates Ghost: - splitscreen markdown editor Tumblr: - Video/Media player --- What are your favorite features? / Nico1 point
-
Regarding the issue of images getting sized larger than original, go back to that documentation page and read about setting upscaling to false. As far as the blurry images goes, check out this post: https://processwire.com/talk/topic/6077-reduced-image-quality-of-images-added-to-image-fields/ and any of the links/advice from horst. It may be due to a bug in your version of PHP.1 point
-
I think that's a little different with WP (or almost any other blog system) compared to PW. Some people may know that I'm involved in the development of the blog system Serendipity. One of the goals for the upcoming version 2.0 there is a new admin backend, which is also supposed to be responsive. Because given the fact that Serendipity only has very few developers, chances are more than slim that anyone will ever make an app, albeit one for iOS, Android and Windows Phone. So I've spent the past couple of months redesigning the “frontend of the backend” there. Man, designing a backend is hard. I have sworn multiple times that I will never ever do that again. It is especially hard because there's lots of features to think about anyway as well as plugins adding functionality to the backend etc. Add the responsive stuff on top of that and you've got a shitload of work on your hands. An app can make this easier. Designing a responsive admin theme means you have to account for any backend feature in all resolutions. With a seperate app, it's … “quite okay”, I guess, to leave out stuff which doesn't make sense on mobile devices anyway and focus on the stuff that people are in fact going to want to do with their blog system on a mobile device. The beauty of the PW backend is that it's very … hm, “simple” sounds wrong. It very … streamlined, I guess. My point is, I think it is much easier to “get away” with a responsive backend theme in PW that in e.g. WP, just because of the overall structure and organization of the backend. (I hope that makes sense.)1 point
-
Please have a read through this: https://processwire.com/api/fieldtypes/images/ You must specify both dimensions if you use size. You are only specifying one. Otherwise you should use ->width or ->height instead.1 point
-
@Macrura, Glad to hear it is useful to you. My original plan was to watch fields regardless of the page context so there's no direct way to do this at the moment. I'll look at adding the page context for the parser.1 point
-
1 point
-
1 point
-
Here some good gallery tuto's / examples : Brought to you by Joss directly from Processwire: https://processwire.com/talk/topic/3046-simple-gallery-tutorial-for-processwire/ http://wiki.processwire.com/index.php/Simple_Gallery_System Owl https://github.com/OwlFonk/OwlCarousel http://www.owlgraphic.com/owlcarousel/#how-to http://www.owlgraphic.com/owlcarousel/#faq Steven http://bxslider.com/ http://bxslider.com/faqs Martin: http://tutorialzine.com/2009/09/cool-jquery-gallery/ http://tutorialzine.com/2009/11/hovering-gallery-css3-jquery/ With processwire's template system and fields html, css and js will just fall in place.1 point
-
1 point
-
Yes, they are being used from CDN, which is often a useful idea - why eat up your own bandwidth? One from google and the other from CloudFlare1 point
-
This is something i was thinking about a couple of days ago. I was wondering if it would be possible to serve somekind of dashboard page instead of the page tree. Looks like this is the base for that to build it upon.1 point
-
This is great as it's Something I've wanted to do on a couple of projects the last few weeks, thanks!1 point
-
OK, so in Craigs photos.php and photos_index.php add this at the top: <?php include("./head.inc"); $options = array( 'quality' => 100 ); ?> And change every instance of $photo->size(1024)... $photo->size(260,260)... to $photo->size(1024,$options)... $photo->size(260,260,$options)... This ensures that the thumbnails are generated in the best quality possible. If the resulting quality is not good enough (you said you were picky about that) you still have the option to generate the thumbs through Photoshop and include a separate thumb-images field into your page template where you upload them. You only would have to make sure then, that both thumbnails and images are in the same order. Maybe you can attach a screenshot of the resulting page or, even better, one of the generated thumbnails on that page so we can see what you mean by "blurry".1 point
-
Hi Max, can you provide us with a link to the page or source code of the page, including css? The images might be blurry because their actual proportions don't match the displayed proportions. By default, PW doesn't change anything about the uploaded images if you do not tell it to do so. In your images field setup in the backend, do you have any dimension restrictions there? You can adjust the quality of your thumbnails with an options array that you pass on to the resize function: $x = 100; $options = array( 'quality' => 100,// adjust quality here 'upscaling' => false, ); $thumb = $image->width($x, $options); For more info see here. For fast page loading I suggest using a jQuery lazy load plugin.1 point
-
That's true Let me give you a bit of detail on how I created this photo section. There are two main templates - photos, and photos_index. They have the following fields: photos_index (fields: title, headline, summary) photos (fields: title, summary, photos) "photos" is a standard "Image" field type which allows multiple images and descriptions. The page tree looks like this: Photos (template: photos_index)2 Star March (template: photos) Easter Training Camp (template: photos) ... Each gallery/album/collection/folder of photos (whatever terminology you're most comfortable with) is just a page that uses the photos template. Within that template, there is an image field that will hold all the images, with the ability to add a description for each one. Nothing will happen on the website without the code - the code that takes the data from the page and transforms it into nice, clean HTML markup for the browser to interpret. View the code for both of the templates. The photos_index template (the parent page, remember) gets the child pages (each album/gallery...). For each one it finds, it will create the link to it, and use the first image from the photos field of album as the thumbnail. The photos template works in a similar way, but one level deeper. First it shows the album's title and summary content if present. Then it gets all the images added to the "photos" field of the current page. For each one it finds, it will create a link to the large size, and display a thumbnail. At the end, there is some javascript that tells the Photoswipe jQuery plugin to activate. Does that help you get any further towards what you're after?1 point
-
OK it seems to work now. I have done the following (from a already installed ProcessWire): - Export database - Modified the lines in the exported file that have ENGINE=MyISAM DEFAULT CHARSET=utf8; to be ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - Imported file in to the database - Created a MySQL config file (in my case /etc/my.cfg) and added the following lines [client] default-character-set = utf8mb4 [mysql] default-character-set = utf8mb4 [mysqld] character-set-client-handshake = FALSE character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci - Restarted MySQL - Modified the following ProcessWire files: /wire/config.php line 47: $config->dbCharset = 'utf8mb4'; /wire/core/Database.php line 72: else if($config->dbSetNamesUTF8) $this->query("SET NAMES 'utf8mb4'"); /wire/core/Fieldtype.php line 421: 'xtra' => 'ENGINE=MyISAM DEFAULT CHARSET=utf8mb4', /wire/core/WireDatabasePDO.php line 82: PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8mb4'", This seems to be working, i didnt get the MySQL PDO error anymore about the \xF0\x9F\x92\x93\xF0\x9F character Altough i'm not so happy to have modified the files in the wire folder, since these are core files and will be overwritten as soon as i update the wire folder by replacing the files inside. Would be nice to be able to set this value somewhere in a config file. Update: a recent update in the PW DEV branche includes the ability to set the charset in the configuration file. The issue is discussed here: https://github.com/ryancramerdesign/ProcessWire/issues/4521 point
-
Requirements: * jQuery script like Fancybox or Colorbox, etc PW won't get into your way. It doesn't care what you use. You could use Mootools if you wanted to (does that still exist, btw?). So, yes, use whatever you wish. But you need to include the script yourself * Image file uploader from the PW admin system (front end) would be nice, but I am ok with uploading the images to the server via FTP if I have to. You can do both. For frontend, there's loads of examples on the forums about (see also Soma's Gists..). With frontend, the more important thing is security.... * Must have control over the generated thumbnail size. This is critical. The full-size images will be set by hand using Photoshop. Yep. Right out of the box. See here... * Access to the grid presentation of gallery thumbnails via a CSS file. Like I have said (previously)...PW doesn't generate or output markup. So, you can output whatever you wish with whatever CSS you wish. PW doesn't know or care so to speak * Pagination: ability to have a single page presenting one gallery of images or a page presenting multiple galleries on a single page. Pagination...right out the box...See here * Fast load times. Excuse me? Oh, OK, what Macrura said * Ability to include image title names and captions OR the ability to not include titles and captions. See here. echo $page->image->url; echo $page->image->description, etc, etc for what you want to show. If you don't what to show them, don't echo them. There are other techniques (yes, the dreaded PHP!) - e.g. echo description only when it is not empty...We can show you how to do that....Also, there's no image title per se, but there's ways round that... Note: In the above "image" examples, this is just echoing out a custom image field called image. There is no field in ProcessWire called image (or anything else actually). Like any other field, you give your image field whatever name you wish (within acceptable fields' naming conventions, of course). So, this could well have been echo $page->photo, etc. Final thing, you can have either a single image field or a multiple images field. For the latter, that's an array...As with all arrays..you need to foreach (loop) through it to output stuff. There are other stuff like echo $page->photo->first() but that's for later1 point
-
So I spent the last couple of hours in creating a module which imitates the Textpattern thing. Take a look. LanguageInstantInstall.module (You have to go to Setup -> Languages and add a new language). It's not completely finished (a function to update, etc. will follow) but it does what it has to do What do you think? / nico1 point
-
Hmm, what I think: Custom fields: You normally create a custom template file for each of the custom admin pages so I don't think you'd need custom fields here. And if you think about using the same custom admin page template multiple times you can use $page->name to difference them. Templates: I understand your point but first I don't see them as real templates but as subtemplates. Of course it probably is a bit cleaner to create a template for each. But as you already mentioned: it's really annoying. Especially if you can't use the fields added to the template anyway. I'm not sure which solution is the best one here, so I would go with the easier. If you would prefer to have a template for each file I would rewrite the select field to select templates instead of files from the template folder. (P.S.: I'm not sure if this is an equivalent comparison but admin pages like "setup" don't have a special template, too, only a file rendering the template and stuff like this).1 point
-
@Nico: making the strings translatable? Think, this should be done in general with every new module.1 point
-
1 point
-
For our client Continental - a german based (but international selling) tire manufacturer we were asked to develop a campaign featuring their sponsorhip for the "FIFA World Cup 2014". We came up with the idea to connect a positive and fun "soccer like offline experience" with Continental as a brand and social media elements plus user generated content as a multiplicator. To encourage people sharing their experiences with others there also are pretty nice prices to be won (tickets to the World Cup in Rio including flight and accommodation). In a glance we've developed everything related to this campaign: Idea, concept, logo, text, artwork, videos, content- and seeding strategy, a lot of print-materials, apps [...]. There even is a "real" stadium which can be either obtained at one of over 6000 partner stores in Germany or they may be downloaded and handcrafted by the players themselves. The campaign has ads in some of the biggest german print magazines (i.e. Stern Magazine). The Campaigns Microsite www.paper-shot.de features: it's own blog with some external authors a retailer locator for finding participating partners (yup, that's >6k partner-pages in pw ) each having a custom set of assets which are shown to people coming from their banners or entering their partner-code custom user registration video/image uploads with a preceding approval process (the videos are first processed by a seperate media-server to serve the right formats to all devices, then reviewed and published by a team of editors afterwards) user-voting twitter & facebook integration for voting and login (not live atm due to some server problems with oauth & our reverse proxy) an unified api that makes it possible to use all of the microsites features in our apps for iOS and Android (for those interested: they are built with PhoneGap/Cordova upon the great ionicframework using HTML5 & angularjs). This was by far the biggest PW-Project we've done yet and we (again) were always happy we've chosen processwire because we definitely needed something flexible for realizing all of this features in quite a small timeframe (about 2.5 months "production" time for the microsite + the apps). Modules used: FieldtypeCropImage - for obvious reasons FieldtypeMapMarker - for generating and fetching the lat/lng for all retailers and storing the adresses ImportPagesCSV - for importing the retailers as pages InputfieldCKEditor - because it's better (and better looking) than TinyMCE ModulesManager - PageEditPerRole - for managing external authors access ProcessBatcher - bulk actions for retailers (saved us HOURS of work!) SchedulePages - show/hide blogposts by date TemplateDataProviders - MVC structure for our templates TemplateNotes - help pages for external editors TemplateTwigReplace - MVC structure & "better" templating TextformatterHannaCode - custom tags for including external services like storify in blogposts TextformatterVideoEmbed - for blog articles VersionControlForTextFields - for "security" and backup reasons + some we've written for the project (they aren't very interesting ones to release to the public)1 point
-
I terms of development and usage standpoint ProcessWire is much better suited for the task then Joomla, Wordpress and even Drupal. But you have to be ready to invest your time in learning some concepts of PW. There are a few of them: page, pageArray, selector, template, template file, field, and module. If you feell comfortable with OOP PHP, CSS and HTML, you will definetely succeed. Of course it will requre some custom coding as with any more or less complex project. I'll try to make some assessment here in terms of efforts required if you have the skills mentioned above: listing and search of properties for rent and sale - easy blog layout display and detail display - very easy gallery for each property - very easy google maps display of location - easy with existing module (some work is required if you need more complex integration) google maps search - (not quite sure what you mean here) I guess it depends on what parameters you want to search, should require some coding user registration - user access control is coming out of-the-box, you just need to customise it for your needs and make registration and login forms for your front end. add to favorites function- easy send to friend - easy social share - some coding requred - I think there are open source social sharing projects you could integrate for this (like this one) and so on - it depends, but I think the rest is super-easy front and back end editing - back-end editing is already here. But front-end editing is what you will have to code yourself. So I suppose could require fair amount of work. restricted access to some sensitive informations (like landlords contact details, clients info and so on) - it depends on the logic of your site, I guess you will have to code some parts. adding property informations with some already defined values in dynamic fields (street names for instance) - from easy to medium, but more info would help. Jquery image upload (automatic resize, thumbnail creation, watermark add) - all is here (thanks @Apeisa and @smd) including watermarks (thanks to @Horst) I am sure you get the picture. Unless you have a strict deadline go with Processwire - it will worth the effort in any possible sense. If it's your first project with PW, it may be not the easiest journey, but an exciting one. In the end you will aquire some great skills and have many insights. And I'm sure, after you've arrived you will never look back . Whereas you arguably could start faster with Drupal (that I think the only competitive CMS option here) dropping some plugins together, you then would almost inevitable struggle with your front-end markup and in general making all work the way you (and not Drupal) want. And again you have to be familiar with Drupal's internals to make those hacks. In PW you develope naturally extending existing functionality and it doesn't make any assumptions about your workflow and markup. So it gives you more rewarding experience during the development process. Almost all the skills you get using PW is transferable to other webdev areas. From the UX point of view PW's interface is a dream coming true (and Drupal is a nightmare IMHO). If you haven't seen PW 2.4 yet, just go and have a look - it's beautiful!1 point
-
I've been working on this one for a few months and just launched it this morning: http://villasofdistinction.com I also did the previous iteration of this site, 5 or so years ago (which was running ProcessWire 1.0). The new site is powered by ProcessWire 2.4 (2.3 dev). The site is responsive and designed for a good experience on both desktop and mobile. While I did all the development, the site's design/look and feel was created by the client (they have their own internal design agency). Most of the work in this project was actually not anything you can see on the front end. Instead, most of the work went towards back-end management, workflow and web services. The client has a large number of editors and agents that needed various capabilities, workflows, feeds and such. So there's a lot more going on here in terms of a management platform than in the previous iteration... and that's mostly what kept me busy for so those few months. Modules used here: Foundation 4 Profile All In One Minify (AIOM) FieldtypeMapMarker (with MarkupGoogleMap) Pro Cache Form Builder Hanna Code Redirects Selector test Changelog Version Control for Text Fields Batcher Admin Template Columns CKEditor Select Multiple Transfer CollagePlus And a few custom modules1 point
-
Since your values appear to be integers, you can sanitize them as easily as: $sanitizedValue = (int) $t; That sanitizes, but doesn't validate the value. Validation is also important, especially with something like an ID number that indicates a reference to something else. This is even more important in ProcessWire, where page IDs can also represent things like users, admin pages and more. To validate, you'd want to make sure the number is valid for the selection. To do this, you'd need to confirm that the value you were given was present in the list of selectable options you gave to the user. Or, if you know the selection is limited to pages from a certain parent or template, you could validate like this: $p = $pages->get($sanitizedValue); if($p->id && $p->template == 'your-valid-template' && $p->parent->id == 123 && $p->viewable()) { // it is valid } else { // it is not valid }1 point