Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/20/2014 in all areas

  1. What I do is use $config->js to populate the config array that I then output in the head for dynamic variables that want to share in a script. $config->js("myconfig", array("myajaxurl" => $pages->get(1991)->url); You can do this in templates or modules doesn't matter as long as it's before rendering page. Then this little to output as json. This is the same as PW uses in the admin to share config vars with js. <script type="text/javascript"> <?php // output javascript config json string to html // for use in javascripts from this point on $jsConfig = $config->js(); $jsConfig['debug'] = $config->debug; $jsConfig['urls'] = array( 'current_url' => $page->url, 'root' => $config->urls->root, ); ?> var config = <?php echo json_encode($jsConfig); ?>; </script> Then use in your script as var rootUrl = config.urls.root; for example
    7 points
  2. You shall not objectify people, but you could objectify Textfields!!! Github: https://github.com/owzim/pw-fieldtype-yaml Module page: http://modules.processwire.com/modules/fieldtype-yaml/ Summary Field that stores YAML data and formats it as an object, when requested. Setup After installation create a new field, let's say called "people" and assign it to a template, or just edit an existing text-based field and choose Yaml for the type, save! In the Details-Tab you have an additional option, the Texformatter option is removed, because it does not make sense in this case. Parse as Default is WireArray/WireData, the data can also be parsed as Object or Associative Array. Associative Array is the fastest and the default output by the used Spyc parser, WireArray/WireData might be the slowest, but it's also the most feature rich. You can access properties like you are used to with pages or fields, like $page->person->get('title|name') or $page->people->find('age>30'). Usage Now, in your just created field you can put in some YAML like this: - name: Jane Doe occupation: Product Manager age: 33 hobbies: - running - movies - name: John Doe occupation: Service Worker age: 28 hobbies: - cycling - fishing In your template, or wherever you are accessing the page, you would use it like any other ProcesssWire data (if you set the parse option to either WireData or Object): $out = ''; foreach ($page->people as $person) { $out .= "Name: {$person->name} <br>"; $out .= "Occupation: {$person->occupation} <br>"; $out .= "Age: {$person->age} <br>"; $out .= "Hobbies: <br>"; foreach ($person->hobbies as $hobby) { $out .= "- {$hobby} <br>"; } $out .= "--- <br>"; } echo $out; More info about YAML: Complete idiot's introduction to YAML Specification Wikipedia Acknowledgements I've used a namespaced version of the Autoloader class from Template Data Providers The YAML parser is a namespaced version of Spyc Edit: updated the repo link
    6 points
  3. Not our first ProcessWire powered website, but definately our most interesting one so far: http://www.rabotheater.nl At Itix we build and maintain online ticketing software for theatres and cinema's. About 30 theatres across the Netherlands are powered by Itix. Our software has some form of integrated content mangement, but this "CMS" does not live up to current standards and client wishes anymore. We decided to move all frontend related content to a PW environment. Eventhough most data still exists within Itix, all website-specific enrichment is done within ProcessWire. PW gets it's data through export/imports (for complete datasets) and a method of triggering events, filling a jobqueue and updating specific single items. Rabotheater is our first client moving to a PW powered website, but I'm confident many will follow. http://www.rabotheater.nl
    5 points
  4. --- ALPHA WARNING --- Hey, today I'm going to release a module which especially is nice for photographers I guess: ImageEXIF (it's in the module repository). What does it do? This module the EXIF data of an image to it's object. There are some aliases (e.g. "exposureTime" and "tv") and unformatted values (e.g. "focalLengthUnformatted") included. Example for which EXIF data get's added: How to use (example): <?php $image = $page->images->first(); echo 'ISO: '.$image->EXIF->iso; // $image->exif->iso would work, too ?> Did I forget some important data? Other wishes?
    4 points
  5. So I suppose this is a somewhat pointless addition, seeing as drafts are about to come to the core, but I needed this right now and ProcessWire made it possible for me to implement over the last two days. An experience that convinced me once more that ProcessWire is absolutely amazing. GitHub link. So what does this do? This module allows you to create a draft version of (hopefully) any page, which can be edited while the public facing page remains in place and unchanged. Drafts are placed under a special Admin page, which also doubles as a rudimentary manager. It shows what pages have drafts assigned and lets you update the original page with its draft. I need all this mainly for front-end editing, so for me the focus is on the added API methods. I have added functionality to redirect every edit to a draft page for testing, and it can make sense to have that behavior of course, so it will probably become a config setting. How does it do that? Page cloning is very very handy for this purpose, so that’s mostly what I’m doing here. It’s elegant in that very little code is needed, but it is perhaps somewhat crude to delete pages, including their field data and files on the file system, so much. I needed some hacky-feeling tricks to convince PW to delete pages that have children and clone pages to my custom admin page even when their template prohibits that sort of parent. What doesn’t this do (well)? Since a draft is linked to its page by having the page ID for a name (!), which conviniently also guarantees uniqueness, modifying page names should be pretty much impossible. It would be best to create a table to store the references, but I kind of like that you can keep everything 100% PW API. The most complicated fieldtypes I have tested this module with are Images/Files and Multiplier. That covers my immediate need, but perhaps PageTables will cause problems. I don’t have any experience with those. There are probably a lot of other things to look out for, but I can’t remember any more right now. Be aware this is most definitely not production ready or anything. I would like to thank Teppo Koivula, whose Changelog module I used for inspiration downright based this on. Great work there, and a lot to learn from. If you find fragments of Changelog in this module, that’s no coincidence. Also hugely helpful are the great members of this forum and Ryan’s code, which I assume we all use as our main documentation <3 Please absolutely tear this apart, if you can spare the time to have a quick look. I like to think I did okay, but I’m eager to learn and I’m sure this is full of questionable practices, bugs and inefficiencies. So yeah, its unlikely anyone will have the need to use this on a site, but hopefully I can get some feedback out of it and perhaps it can teach other beginners like me a trick or two. GitHub link again. /wall of text
    3 points
  6. On the Rabotheater page the DOM doesn’t change at all. The buttons just change the class of the list, thereby changing the CSS. I would recommend this technique unless you want your views to show different data. You can solve the different presentations either for the entire list, or for the individual films. I would probably go with the latter: You have three templates for a film page: film.php – Just your regular page template to display a specific film. This is the only film template that is represented in the Admin. film_list_image.php – Only the markup for a list item showing the film and perhaps some relevant info in the “collage” style. film_list_title.php – List item markup including the film title and perhaps release year, review score, or whatever. On the list page, you render films using the $page->render() method with the chosen template as the first argument: $film->render('film_list_image.php'); You can switch between styles by reloading the entire page with Post, Get or urlSegment input, and perhaps store the preference in $session or $user. You could also load the films with AJAX and call $film->render() with the template there, then return the new markup to the list page. Of course, it might be better to return the film information in JSON format and build the presentation markup of choice with JavaScript on the list page. As you can see, there isn’t one technique that fits all. The CSS option is definitely the fastest, simplest and arguably the best way, provided you can keep the markup the same between both list styles. Just have a look at the Rabotheater site in your Element Inspector. Wicked fast, no DOM changes except one class attribute, no additional server requests. You could even animate the change. I only go into the other stuff because it incorporates ProcessWire and because it answers your question about having two templates for one page.
    3 points
  7. Within the single template file you can include different files in multiple fashions, these don't need different templates in the admin, as they use the same data. One example would be like this. if( $view == "something"){ include "view_1.php"; // Include titles view }else{ include "view_2.php"; // Include images view }
    3 points
  8. Dear Adrian! I just updated the module and finally, for the first time in 2 years was able to just through the pictures in there instead of manally renaming and moving them to the right folder. It was such a pleasure! You + PW just gifted me a moment of true happiness. I was delighted to show this to my companion working on Joomla! And equally proud of the community to say that this was just done in few days especially for my case. Can't find any dancing emoticon so putting this one . My last challenge is to make them resize on upload.
    3 points
  9. You can also PW API since 2.4 or 2.5 echo $page->blog_tags->implode(", ", "title");
    3 points
  10. Just in case anyone missed it... https://letsencrypt.org/2014/11/18/announcing-lets-encrypt.html The headline is: Let’s Encrypt is a new Certificate Authority: It’s free, automated, and open. Arriving Summer 2015 Extract: Let’s Encrypt is a new free certificate authority, built on a foundation of cooperation and openness, that lets everyone be up and running with basic server certificates for their domains through a simple one-click process. Mozilla Corporation, Cisco Systems, Inc., Akamai Technologies, Electronic Frontier Foundation, IdenTrust, Inc., and researchers at the University of Michigan are working through the Internet Security Research Group (“ISRG”), a California public benefit corporation, to deliver this much-needed infrastructure in Q2 2015. The ISRG welcomes other organizations dedicated to the same ideal of ubiquitous, open Internet security.
    2 points
  11. I have a images field with a large number (about 400) of images. Uploading took a while, but worked. But when I try to remove them all by double-clicking the trashcan icon and saving the page nothing happens. The page editor just reloads with all images still there. I get no error message. Removing only a small set of images works like expected. Is there a php/server setting I need to change? Currently I am testing this in my local MAMP environment. Edit: I found something in my server logs: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 I edited the php.ini to include max_input_vars = 10000 and now it seems to work.
    2 points
  12. Check the entry $config->userAuthSalt in your site/config.php file. This hash must be identical with the one on your live site.
    2 points
  13. @Nico: Hey, a new metadata man! I have had a quick look to it, not installed and tested yet. But I already spotted a few lines where I may suggest to test if function_exists("exif_read_data") in/before install(), just to be on the save side! there are a ton of possible data names outside in the wild, actually you have cut them down to a more or less small set of the most needed ones, but if for example a photographer uses / needs some that you have not in your list, the module is useless for him. I recommend to add the ability to access the raw data as object, unfiltered, not cutted, etc. What I really like is that you just read the information from the original imagefile on demand and do not try to store/cache it elsewhere! ALso really nice for me is the Line 88, your comment on this. For me, that I do not use / need EXIF-data at all, this is the one and only important information from all that EXIF-data. It tells us in which direction the camera was turned when taking the shot, for example. (have a look here and here, followed by 985 and 1000). We use it to autoRotate images where needed.
    2 points
  14. Nice one Nico but don't ask Horst ! (or you will be busy like hell the coming month)
    2 points
  15. I know what you mean with woocommerce but I still think it was well thought out especially since it had to be built within the limitations of Wordpress though if woocommerce was available for processwire I woudn't complain. Updates updates....How many minutes, hours or days of a wordpress users life are wasted on updates? Still Wordpress developers don't seem to mind as this gives them a great way to charge their clients for the extra site maintenance.
    2 points
  16. 2 points
  17. Well said! - Happy Emacs user (Though, on a more serious note, Emacs is actually actively developed. I just haven't upgraded in a long time. Why bother, when it already does everything.. and a bit more.)
    2 points
  18. Hi, Only thing I can think of is: it is sent via POST when you press the save button, so you may check the setting for post_max_size. With enabled DevTools in your browser you may easy be able to read the amount of sent POST-data. PS: a good setting for max_post_data is 240M when the upload_max_filesize is set to 200M
    2 points
  19. Or, have a look at grunt. I use grunt-ssh for sftp along with grunt-sass and other grunt tools. It uploads on save. Have browser alongside and see results on reload. Pretty instant.
    2 points
  20. https://processwire.com/talk/topic/3601-field-label-language-problem/
    2 points
  21. I officially claim this to be a comic sans day: One of those days git hates me and i hate git. // pushed another updated to github. this time it actually contains updates to the code.
    2 points
  22. I prefer to do it this way: this, another, that & those $out = ''; $count = count($update->client_location); foreach ($update->client_location as $key => $geo) { $div = ($key + 1 === $count) ? ($count === 1 ? '' : ' & ') : ($key === 0 ? '' : ', '); $out .= $div . $geo->title; } echo $out;
    2 points
  23. I've only just switched to PHPStorm from DreamWeaver - I don't think I could handle more than one change a decade
    2 points
  24. A big PR is coming soon
    2 points
  25. Hi Tomo83 and welcome to PW. I think you just want: $player->playername You are looking for the value of the field "playername" on the page that is referenced by the variable $player. If you use: $player->fields->get("playername") you'd actually most likely be looking for things like: $player->fields->get("playername")->label or: $player->fields->get("playername")->description
    2 points
  26. This module allows you to automatically rename file (including image) uploads according to a configurable format This module lets you define as many rules as you need to determine how uploaded files will be named and you can have different rules for different pages, templates, fields, and file extensions, or one rule for all uploads. Renaming works for files uploaded via the admin interface and also via the API, including images added from remote URLs. Github: https://github.com/adrianbj/CustomUploadNames Modules Directory: http://modules.processwire.com/modules/process-custom-upload-names/ Renaming Rules The module config allows you to set an unlimited number of Rename Rules. You can define rules to specific fields, templates, pages, and file extensions. If a rule option is left blank, the rule with be applied to all fields/templates/pages/extensions. Leave Filename Format blank to prevent renaming for a specific field/template/page combo, overriding a more general rule. Rules are processed in order, so put more specific rules before more general ones. You can drag to change the order of rules as needed. The following variables can be used in the filename format: $page, $template, $field, and $file. For some of these (eg. $field->description), if they haven't been filled out and saved prior to uploading the image, renaming won't occur on upload, but will happen on page save (could be an issue if image has already been inserted into RTE/HTML field before page save). Some examples: $page->title mysite-{$template->name}-images $field->label $file->description {$page->name}-{$file->filesize}-kb prefix-[Y-m-d_H-i-s]-suffix (anything inside square brackets is is considered to be a PHP date format for the current date/time) randstring[n] (where n is the number of characters you want in the string) ### (custom number mask, eg. 001 if more than one image with same name on a page. This is an enhanced version of the automatic addition of numbers if required) If 'Rename on Save' is checked files will be renamed again each time a page is saved (admin or front-end via API). WARNING: this setting will break any direct links to the old filename, which is particularly relevant for images inserted into RTE/HTML fields. The Filename Format can be defined using plain text and PW $page variable, for example: mysite-{$page->path} You can preserve the uploaded filename for certain rules. This will allow you to set a general renaming rule for your entire site, but then add a rule for a specific page/template/field that does not rename the uploaded file. Just simply build the rule, but leave the Filename Format field empty. You can specify an optional character limit (to nearest whole word) for the length of the filename - useful if you are using $page->path, $path->name etc and have very long page names - eg. news articles, publication titles etc. NOTE - if you are using ProcessWire's webp features, be sure to use the useSrcExt because if you have jpg and png files on the same page and your rename rules result in the same name, you need to maintain the src extension so they are kept as separate files. $config->webpOptions = array( 'useSrcExt' => false, // Use source file extension in webp filename? (file.jpg.webp rather than file.webp) ); Acknowledgments The module config settings make use of code from Pete's EmailToPage module and the renaming function is based on this code from Ryan: http://processwire.com/talk/topic/3299-ability-to-define-convention-for-image-and-file-upload-names/?p=32623 (also see this post for his thoughts on file renaming and why it is the lazy way out - worth a read before deciding to use this module). NOTE: This should not be needed on most sites, but I work with lots of sites that host PDFs and photos/vectors that are available for download and I have always renamed the files on upload because clients will often upload files with horrible meaningless filenames like: Final ReportV6 web version for John Feb 23.PDF
    1 point
  27. 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/lng
    1 point
  28. Hi, I have over 200 lines of javascript code at the bottom of every page that does not get compressed and therefore adds to the page load. I'd therefore like to add this code to all the other javascript code that is located at /site/templates/styles/js/ and output as a single minified file via AIOM at /site/assets/aiom/ The problem is that the javascript code at the bottom of every page includes calls to the Processwire API such as: <?php // URLs for $.ajax() $subscribe = $pages->get("template=some-template, include=hidden")->url; $productLinks = $pages->get("template=another-template, include=hidden")->url; ?> <script> // [...] $.ajax({ url: "<?php echo $productLinks ?>", type: "POST", data: { category: category, id: <?= $page->id ?> } // [...] $(.some-class).html("<p><?= _("This text needs to be translated") ?></p>"); </script> As far as I know, the above API calls can only be made from within a template, so I am afraid there is no straightforward way to bundle this code with my other javascript code. Still, I highly appreciate any ideas of how one might go around this problem. Maybe is is possible to make the API calls in the template, and then somehow pass the return values to the javascript file. Cheers, Stefan
    1 point
  29. FrontendUserLogin Module to handle frontend user login / logout. Also should work with Persistent login for users (mode: automatically) out of the box Version 0.3.1Requires PW 2.5.5 (fields defined by array) Download Processwire module page: http://modules.processwire.com/modules/frontend-user-login/ Bitbucket Repo: https://bitbucket.org/pwFoo/frontenduserlogin/ Usage Readme file Module isn't available anymore, but it's planed to replace FrontendUserLogin and FrontendUserRegister with the new FrontendUser module which is not released yet. A new support topic will be created after FrontendUser module is added to the PW module repo. FrontendUser module
    1 point
  30. Sorry for disappointing you.. I changed it to alpha. I tested it with some jpgs I uploaded on my local PW installation and there everything worked fine. I'll take care of the points you mentioned and update this post here afterwards.
    1 point
  31. I stayed off facebook for 3 years until I had to submit to it again as many people I know would only communicate through facebook. Even though I did close my facebook acount I discovered that it never actually got deleted. It appears that facebook never actually delete your account but just mark it as sleeping. If you want to awake into the facebook world again it is just a matter of signing back in and the account is reactivated.
    1 point
  32. All translations for 3rd party modules are deleted from the repository. Hopefully we'll find a place for these poor JSON files too
    1 point
  33. @Nico: I have installed it, but it was hard to get it returning some data for me! There are some really heavy faults with your module: you need to check image type before passing a file to exif_read_data, please test with png and/or gif and set debug to true! there is no error handling, null, nix, nada. With some jpeg images I get: Warning: exif_read_data(motiv_wood.jpg): Incorrect APP1 Exif Identifier Code in .../site/modules/ImageEXIF/ImageEXIF.module on line 29, and then there is no retrieved data available! there are tons of PHP Notices regarding undefined indexes! depending on available data in the exif headers. there are also no checks for any of the needed APP marker (EXIF, IFD0, FILE) Some minor issues may be: when my original data for FocalLength is "107/25", you return me: focalLengthUnformatted = 4.28 and additionally focalLength = "4.28mm". For what is this useful? I would expect that you give me: FocalLengthIn35mmFilm = 35, regardless if added "mm" or not. That one is commonly important but missing. I get returned this: comment = "ASCII\x0\x0\x0© John Doe", The \x0 are binary NULL, what truncates any following string data! This way the users of your module never will get their UserComments returned. But exif_read_data already computes this to: UserCommentEncoding = "ASCII" and UserComment = "© John Doe". Why don't you use that when already returning filtering and manipulating data? a micro-issue: is returning the mimetype useful? It only can be image/jpeg, or what else? there is more, but I become more and more angry ... Nico, it is signed "BETA, close to stable" in the directory. This is a joke, no? Maybe the cool kids today do not need testing / debugging anymore? I don't mind if anyone personally like to jump out of an airplane flying 10.000 feets high without using a parachute. But I'm really angry if someone throws out other people without them giving a parachute! I'm curious about what docs / specs you have read about EXIF and about how many people already have tested this (besides you) before you uploaded this to the directory as "close to stable"? I would have expected that you turn on debugging when developing a module for the public and also would have expected that you first post it here into the forum as alpha module. But most of all the usage of errorhandling! Thanks for reading. I will review your next release if you like - but not when it is missing the above mentioned things. ------ PS: here is a good summary on the subject in German: http://www.dslr-forum.de/showthread.php?t=131920
    1 point
  34. My ImagesManager also supports reading exif data and saves it to a field.
    1 point
  35. Not sure you have seen this in Hanna Code's PHP usage notes? Hence $page->template refers to your blog post template whereas wire('page')->template refers to your summary page template.
    1 point
  36. If you mean something like this go ask the author! I'll be very interested to get the answer too so will watch on that topic.
    1 point
  37. Well if it is such specific I would put it in a module as such kind of documentation usually goes into a print out manual or PDF and not at all needs to be included into the admin area. It blows up the site unecessarily and makes it heavy especially when you add screenshots images etc. Like you said if it is such specific keep it specific for those who don't write manuals as pdf for their customers. IMHO much more important is the general usage of a processwire site and this can be managed very easily like I described above and it does not blow up the sites with unnecessary ballast. It gets loaded from a central server includes translatations and would make the job for devs and manual writers much easier. Beside that a great documentation about the possibilities of Processwire categories for the 4 Group of users would be available - similar to a good book! With the "sepcialized" doumentation you woul do good to keep it on your server and connect it to that as described. So you can make changes and improvements to the doumentation whithout the need to access sites and usually there are many things you simply could reuse on most of your sites. With taging you could put them into an order. Beside that it would be also a great place to inform customers about news, security fixes, improvements, or even special offers as you could add them on your server. This could drive also more revenue to your business! and to Processwire!
    1 point
  38. Ivan - thanks for the feedback - glad it has made you so happy Without getting too far down the road on the resize on upload topic in this thread, does the "Max Image Dimensions" setting on the Input tab do what you need? The description explains it as: "Optionally enter the max width and/or height of uploaded images. If specified, images will be resized at upload time when they exceed either the max width or height. The resize is performed at upload time, and thus does not affect any images in the system, or images added via the API." If you need some different behavior that you don't think already exists, perhaps you could post something in the Wishlist board.
    1 point
  39. 1 point
  40. That's true somehow. But that's what we've learned from the software industry: The next big thing is always just round the corner.
    1 point
  41. Twitter and PW are as social as I can get in the net, but looks interesting
    1 point
  42. In that case, there seem to be a number of other options. In PW 2.5.? (can't remember version) you can export and import fields. https://processwire.com/blog/posts/august-2014-core-updates-1/ Maybe even Adrian's migrator can help here? Not sure, would need to confirm
    1 point
  43. You need to 'read' MarkupBlog code . Search for rtrim to see an example.. rtrim() http://php.net/manual/en/function.rtrim.php
    1 point
  44. Surely say the learning curve is neglible? I mean apart from understanding how the Finder works and some basic navigation of the directories, there can't be much to learn. BTW I'm actually a Mac and PC man myself. Been building my own PCs for years (for gaming). I've nothing against PCs but think Windows is a nightmare.
    1 point
  45. http://claysvehiclerepairs.uk/ A new and very subtle garage website .....not! Clays are a local company and this site is definitely locally aimed. From the technical point of view the website is reasonably brave. The client was keen to list every type of modern car they will deal with and that means almost all of them. I managed to get a reasonably, though not complete list and from that used import pages from CSV to create all the pages for both models and cars. The content for all the pages is centrally generated using lots of Hanna code to insert the manufacturer name and or model name. However, all this content can be overwritten on a page by page basis. Over time the client will be adding his own information about some of the vehicles, especially those he sees a lot of. Service pricing is handled in a similar way. Prices for the three levels of servicing are set centrally but then can be overwritten locally. Generally he says he will use this little as he wants to keep his pricing simple, but the facility is there for him. The site consists of some 980 pages ( a pure beginner in PW terms! ) I have used Lister heavily on this site with most things, including output from the contact form, having a lister of some sort. Hanna Code has been used for the models but also handles all things like phone number, company name and so on, to try and keep consistency throughout the site. Modules used are: Batcher Import Pages Page Field Select Creator Pro Cache (not turned on yet) AIOM Form Builder Hanna Code Color Picker Lister Pro Sitemap Template Notes And a few bits I can't remember! The framework is Foundation 5. I used sass quite a lot here basically to generate my own version of foundation.css with only what I needed. A lot was removed. I have gone a bit mad with the Favicons, using http://realfavicongenerator.net/ Well, they certainly cover everything! The site has been created over many months for non technical reasons, but I have kept it up to date even when it was dormant so that it is running the current version of PW. All the graphics were created in house (that would be me) and my copy of Illustrator has now gone for a lie down. This is a moderately complicated site, allowing for the fact that it offers no functionality for the user other than just reading the site. But I was pleased I could make the site heavily localised and cover everything the client wished with ease. One of his competitors (who also is one of his friends) has a similar idea of a site but built with "another" well know CMS. I won't send you to it - it creaks and groans like a half sunk boat and apparently it is a pig to try and administer and seems to go ape everytime it gets upgraded. So far, the client has been thrilled at how logical the back end of his new ProcessWire website is! There is a lot more to this site than meets the eye, but I am sure you get the general idea!
    1 point
  46. Like the idea, but it really does seem a bit vague. Would love to see this taken further, though I was also wondering about translations (like @yellowled said earlier) and the roles; you mentioned "admin" and "user", but I can think of quite a few cases where those won't be enough (some modules define a bunch of permissions, use cases may vary between roles or groups of users, etc.) Would you see this as something that is bundled with the module as a file (perhaps something like modulename.docs.md) or a module setting, or what? Should superuser be able to completely override the docs without touching files in the module directory? Mostly thinking of cases where we might require something specific -- or just felt that a different angle would better fit particular client. Sorry, it's getting late here and my head seems to be full of questions I guess this depends on your point of view. In terms of docs Linux tools tend to be lightyears ahead their proprietary competitors, and a lot of open source projects I've worked with have had (at least) quite extensive code-level documentation (i.e. comments). For most parts ProcessWire is a good example of this
    1 point
  47. Here's what usually happens in my experience: I spend about a (paid) day documenting the specific setup of PW sites for clients, proof-reading and carefully crafting nice PDFs, which I then mail to the client. Clients usually go “Oh, this is great! We have or own manual tailored to our needs which we can reference any time we don't remember what you told us in the CMS training! I'll print out copies for everyone right now!” Weeks or months later I get a call. “Erm, we kind of forgot how this-and-that works, and we were wondering if you could come in for another CMS training? We haven't used the system in a while and most users forgot what they learned in the training.” – “Well, you always have the documentation I wrote for you …?” – “Yeah, about that … could you send us another copy of the PDF, please?” The alternative is clients that go “Nah, we don't need documentation, we'll get along with the backend just fine.” And they do, because PW can be pretty self-explanatory. Bottom line, documentation is important (and PW is documented pretty well already, compared to other CMSs out there). But a lot of end users (again, just in my experience) tend not to read it, because they prefer a human expert to tell them how what they specifically need works. (Which is why questions get asked over and over again in forums, in my opinion.) I'm not sure a documentation integrated in the backend would really work and thus be worth the effort or overhead. (In fact, I don't even know if it would be an overhead.) Also, there's the risk of inconsistent (some things being documented very well, others not so much) and outdated documentation, which I feel is almost worse than no documentation at all. Oh, and translations, of course.
    1 point
  48. OK, I have gone ahead and customised Batcher to do this. Almost ready but there are a few kinks (js/css). The 'Tag' action is hidden on load (similar to Change Parent) but it is not hidden on selection of a different option; js is not my forte. PW API side works fine although you may want to limit the number of pages you apply batch tags to. You can apply single or multiple tags. There are also some hard-coded things in there that you might want to change such as the name of your 'tags' field. Just search for @@kongondo in the ProcessBatcherExt.module and ProcessBatcherExt.css files for changes I added. Feel free to do with it as you please BatcherExt.zip
    1 point
  49. The links on this page may be of use: http://stackoverflow.com/questions/7508800/is-there-any-good-ical-vcal-parser-in-phplibrary but there's nothing built into ProcessWire that I know of that would give you a headstart. At the end of the day it's less about how it would work in ProcessWire and more about learning what the requirements are to get one built in PHP without ProcessWire, then applying that knowledge by building the necessary fields and templates in ProcessWire to get the job done.
    1 point
  50. I understand and know this, but why do you need to get the translation when it is just already there. It will output in the language the user views the page ($user->language) This works just fine in the language the user view the page. echo $fields->get("body")->label; Edit: ah, hm it does not? Ok it doesn't get translated as with page fields. Since it's meant to be used for backend context there's no language value for fields settings. So you either use a $lang variable like this: $lang = $user->language->isDefault() ? "" : $user->language->id; // Default needs no id echo $fields->get("body")->get("label$lang"); Or a little hook to add method to the $fields template API var. // from template or a autoload module $fields->addHook("getLabel", null, "getLabelLang"); function getLabelLang($event){ $field = $event->arguments(0); $lang = wire("user")->language->isDefault() ? "" : wire("user")->language->id; $event->return = wire("fields")->get($field)->get("label$lang"); } // now we use it and it will recognize user lang echo $fields->getLabel("body");
    1 point
×
×
  • Create New...