Jump to content

Leaderboard

Popular Content

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

  1. Just a simple contact form including spam protection. Optional support for Twig (TemplateTwigReplace) as template engine. --- Please have a look at the readme on github! If you upgrade from version 0.0.9 and below, there are some extra steps to be taken. The Guides Installation Module Settings Spam Protection Usage Logging Upgrade Notes
    4 points
  2. I just noticed that this lonely little post did not have a reply So, Ryan, when you posted this topic back in 2010, did you know what a huge can of process-worms you were opening?
    4 points
  3. Like most newbies (I suspect) I am now exploring different Modules. To be honest some of them leave me wondering "how and when would I use this?" I bet most of you have favorites, a few oft deployed modules, that you reach for most of the time. I wonder if the most used modules would be the same for most of you? Anyways, I am interested (maybe others as well) in learning what modules you guys reach for most of the time... Thanks!
    3 points
  4. If you start with AdminThemeReno, a lot of what you've shown here shouldn't be too difficult with just some CSS changes. A small bit of markup change to move the search input into the sidebar. Give it a shot. I think you'll be surprised at how easy it is.
    3 points
  5. 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.
    3 points
  6. Hi Peter, I'm not sure if the selector engine has something to take care of this in a more straightforward way now but let's see if I'm able to help you with this approach anyway. Looks like you're not saving the results of your find() calls into variables. Check my example you're referring to: I'm using $results and $additionalResults to hold the found pages and import the contents of $additionalResults to $results. And remember $pages is a system variable you shouldn't be saving anything to yourself. On top of that, it would be better to find unattached domain_ip's first and import only one page (which you don't have to find by the way), not the other way around. Something like this would probably work: // find free ip's $selectable_domain_ips = $pages->find("parent=/domain_ips/,server_id=$page->server_id_select, include=hidden, account_id="); // add currently selected one to the list $selectable_domain_ips->import($page->domain_ip_select); return $selectable_domain_ips; It seems you've got a two way relation here - or do you really? For this to work you'd have to take care of (un)setting account_id of domain_ip pages yourself. If you've got that set up and working already you should be fine. If not, I'm sure someone here will help you get there (or suggest a whole another approach to make it simpler). I'm a bit rusty myself not having done anything with PW or PHP in months.Hope this helps.
    3 points
  7. Just a very vague idea here. The idea is to create a set of help pages in the back end. Not the wonderful notes system from Soma (which is ever useful), but a centralised system that is partly automated. So, for each module two sets of docs are written by the developer - admin and user. When a module is installed, these are automatically added to the backend help system. This is permissions based, so the superuser can decide who can see which set, plus make exceptions for specific modules. This includes switching some of the docs off entirely if it is thought they might confuse or are simply not needed. (Might even allow devs to pre set this if their mod adds functionality where docs are unlikely to be needed) Additional notes can be added manually to each of the docs at either the head or tail so the admin can add anything specific to that particular website. When modules are updated (which might include updates to their docs) these additional notes are not affected and still work. Extra docs can then be added by the admin for site specific functionality that are not related to a specific module. The entire lot can be viewed in the admin as a cohesive set or can be viewed as in context help in a popup. Sorry! This system does put a pile of work on module developers (and even more on Ryan), but the result if worked out properly could help the day to day usage of the admin enormously and makes ProcessWire even more accessible to potential clients The two sets are key here. On other systems where help is built in, it is often aimed at the admin not the user, so the poor user gets flooded with information they might not understand and do not have the permissions to use even if they do. This way, each user, admin or other, just gets the bits they need which is a lot cleaner!
    2 points
  8. 2 points
  9. @Joss: not too far-fetched, but you could always try the Hanna Code Helper module too. Not trying to advertise it or anything, but I feel it's pretty convenient to see the tags right in the context where they're actually needed. Slightly longer description would be great thing to have, either way
    2 points
  10. Have a question? Click the "new topic" link to the above right of this message.
    2 points
  11. Note: new commit. 1.0.5 Hot bug fix for TinyMCE introduced in the last update.
    2 points
  12. Nothing earth shattering, but easy to implement. <ul class='breadcrumb'> <?php foreach($page->parents as $parent): ?> <li itemscope itemtype='http://data-vocabulary.org/Breadcrumb'> <a href='<?php echo $parent->url; ?>' itemprop='url'> <span itemprop='title'><?php echo $parent->title; ?></span></a> <span class='divider'>›</span> </li> <?php endforeach ?> <li><?php echo $page->title; ?></li> </ul> It's based on the breadcrumbs in the default PW profile, but the presentational markup is Bootstrap flavoured. Try it and copy the resulting html snippet into Google's rich snippets testing tool - http://www.google.com/webmasters/tools/richsnippets.
    2 points
  13. Done 2 years ago PW 2.2-3 and it's still working.
    2 points
  14. Yes, it does. I have it run with nginx, so I don't care about the .htaccess Read the instructions on how to get hhvm running here: http://hhvm.com/blog/1817/fastercgi-with-hhvm You might need some tweaking and run into a lot of issues - hhvm has not been tested with ProcessWire. I also chose to let it run at port 8999 to be easily able to switch between hhvm and php5 for reasons of comparison. Your mileage may vary, but with a modern system your chances of getting it to work are better. Some stats using a fresh installation of Processwire with the site-beginner scheme ab -c10 -n500 http://pwtest.gurkendoktor.de/ php5-fpm: Concurrency Level: 10 Time taken for tests: 23.425 seconds Complete requests: 500 Failed requests: 253 (Connect: 0, Receive: 0, Length: 253, Exceptions: 0) Total transferred: 1902241 bytes HTML transferred: 1700241 bytes Requests per second: 21.34 [#/sec] (mean) hhvm: Concurrency Level: 10 Time taken for tests: 8.702 seconds Complete requests: 500 Failed requests: 232 (Connect: 0, Receive: 0, Length: 232, Exceptions: 0) Total transferred: 1900304 bytes HTML transferred: 1700304 bytes Requests per second: 57.46 [#/sec] (mean) This is in no way scientific. PHP does not use an opcode cache, which speeds up things a lot. on the other hand, hhvm gets better the "warmer" it gets (ie. the more load it gets). The nice thing is, that it still works with fcgi_cache: Concurrency Level: 10 Time taken for tests: 5.110 seconds Complete requests: 500 Failed requests: 491 (Connect: 0, Receive: 0, Length: 491, Exceptions: 0) Total transferred: 1912527 bytes HTML transferred: 1699527 bytes Requests per second: 97.85 [#/sec] (mean) Yes, there are some more "failed requests" - I blame this on ab Anyway, this is just plain ol' PHP Code. What would be interesting is to actually write a module in hack (the hhvm language) and see if this actually works. Because then you'll be able to harness hhvm's full power and experience an incredible performance boost. I'll figure this out later when there's time. More interesting it would be to fork the ProcessWire core and move it to hack. This would incredibly boost the performance, but brings other issues. But I guess this is too much of an effort, I myself wouldn't be able to do it
    2 points
  15. See these examples: http://processwire.com/api/variables/pages/ https://processwire.com/talk/topic/1153-adding-images-to-a-page-via-the-api/ https://processwire.com/talk/topic/1153-adding-images-to-a-page-via-the-api/?p=10334 https://processwire.com/talk/topic/206-renaming-uploaded-files-from-tmp-name/#entry1371
    2 points
  16. I don't have any experiences making admin theme so I don't know how much time it would take. however, I plan to make it work ... sometime ... in the future ... now I don't have enough time to start working on it.
    2 points
  17. It's pretty pricey for a small tool, but every once in a while, you can find Better Rename discounted or in a bundle. Doesn't do random strings as far as I know, though.
    2 points
  18. No, unfortunately you can't. That's the "either-or selector" mentioned in roadmap for ProcessWire 2.5+ (Winter 2013/2014). Those examples from the documentation SiNNuT refers to do mention the or-operator, but it can't be used quite like this. "Or" is fine within a single selector but currently there's no support for having an "or" between two or more selectors, it's always "and" which is denoted by a "," (comma). On the other hand, if you don't need native pagination for the results of this kind of query (and there won't be too many results!), you could use something along these lines: $results = $pages->find('fieldA=xy'); $additionalResults = $pages->find('fieldA=z, fieldB=x'); // this leaves no duplicates to the PageArray $results->import($additionalResults); The resulting PageArray can be also sorted and sliced to get exactly what you need. But again, by now you've already fetched all the matching pages from the database into memory, so this is merely to tidy things up - or the core of a custom pagination of course. // sort first by fieldA ascending, then by fieldB descending and leave only 10 items starting from index 50 $slicedResults = $results->sort('fieldA, -fieldB')->slice(50, 10); So for small amount of data there's quite an easy way to get around it. But for larger amount of data you'd need to come up with another kind of method, probably one that depends on the nature of the data you're dealing with.
    2 points
  19. 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
  20. Heavily influenced by Ryan's Login Notifier, the Session Login Alarm module can log access attempts and optionally send emails to users when their accounts are accessed (successfully or unsuccessfully.) This can give users some indication of unexpected activity on their accounts.
    1 point
  21. This module is obsolete and will not be developed any further. Please use the ImageExtra Module instead. Overview This module allows you to add additional informations to an image (for example: title, description, link, orientation and any field you may need). If you want to, you can install FieldtypeImageExtraLanguage to get multi-language support. For more informations have a look at the readme. Installation 1a. Clone the module and place FieldtypeImageExtra in your site/modules/ directory. [OR] 1b. Download and unzip it from the module page. git clone https://github.com/justonestep/processwire-fieldtypeimageextra.git your/path/site/modules/FieldtypeImageExtra 2. Login to ProcessWire admin and click Modules. 3. Click "Check for new modules". 4. Click "install" next to the new FieldtypeImageExtra module. If you need multi-language support, you have to install the FieldtypeImageExtraLanguage module. 5. That's all - no settings are required but possible. Define your custom fields 1. Login to ProcessWire admin and click Modules. 2. Open `Images Extra Inputfield` Settings. The following fields are available by default: orientation - image orientation orientation values - values to use as classnames or identifiers for different image orientations title - image title to use for title/alt tag or/and caption, if empty, the content will be generated from the applications filename description - image description link - image link to internal pages If these fields are not enough for you, you can add any other field (for example _author_ and _location_) by writing it (separated by comma) in the field otherField. If you don't need all custom fields, you can easily disable them. One more exception is orientationValues. Here you can insert identifiers for classnames or similar separated by comma. This values will be available in a dropdown list. Usage 1. Under Setup and Fields create a new field using type `ImageExtra` or `ImageExtraLanguage`. 2. After entering the new field name and label, click Save. 3. Configure it depending on your own needs. 4. Save. 5. Add your new field to one or more Templates. Accessing the value This is no different than accessing the value of any other field. $image = $page->image->getRandom(); echo $image->title; echo $pages->get($image->link)->url For use with TemplateTwigReplace {% set image = page.images.getRandom() %} {{image.title}} {{pages.get(image.link).url}} Screenshots Here is a litte example how to access the new fields: // if there are images, lets choose one to output in the sidebar if (count($page->images)) { // if the page has images on it, grab one of them randomly... $image = $page->images->getRandom(); // resize it to 400 pixels wide $image = $image->width(400); // output the image at the top of the sidebar $sidebar = "<img src='$image->url' alt='$image->description' />" . "<h3>$image->title</h3>" . "<blockquote>$image->description</blockquote>" . "<p>$image->author ($image->location)</p>" . $page->sidebar; }
    1 point
  22. I'm a PC guy and don't own a Mac so testing for tedious JS issues on a Mac that aren't visible on the same browsers on the PC would have been difficult if it wasn't for a free trial of this: http://crossbrowsertesting.com The issue was a weird date bug when changing months in a calendar - on Windows my code changed the month name in a <span> just fine based on the current month showing in the calendar. On Mac for some reason, when you went to the next month the same month name showed, but it then worked fine after that. I suspect something wasn't playing with the calendar plugin I was using, but it's all sorted now. Just being able to try lots of different things to see what worked on Mac saved me about 30-40 emails to someone whilst tweaking things saying "can you check now?"
    1 point
  23. I have been doing something a little similar for myself just using a google site, though I have also started using onenote for bits. Yeah, I know, very un-codey! But I like the notebook/tabs/pages arrangement. Easy to find things.
    1 point
  24. Something you have on API side which is simple really. $p = $pages->get(1001); $p->of(true); // if in a template code, turn off output formatting $p->images->add("http://placehold.it/350x150.jpg"); $p->save(); $p->of(false); Everything is possible. With a simple module. As a basic start add a text or url field to the template near your "images" field, like a text field "add_images_url" Now with a autoload module (like site/modules/HelloWorld.module) you add a hook to when the field has url it will store it to the "images" field (or any on the page). All you need is to enter url and save page. <?php /** * AddImagesFromUrl * * On a page with fields * "add_images_url" text field * "images" images field * */ class AddImagesFromUrl extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'AddImagesFromUrl', 'version' => 101, 'summary' => 'Add images from url to images field', 'href' => 'http://www.processwire.com', 'singular' => true, 'autoload' => "template=admin", 'icon' => 'smile-o', ); } public function init() { $this->addHookAfter('Pages::saveReady', $this, 'addImage'); } public function addImage(HookEvent $event) { $page = $event->arguments("page"); if($page->template != "basic-page") return; if(!$page->add_images_url) return; // now interesting part, anything is possible here if(strpos($page->add_images_url, ".jpg") != false) { $page->images->add($page->add_images_url); $this->message("Added image from '$page->add_images_url' to images field"); $page->add_images_url = ''; } } } https://gist.github.com/somatonic/49f9e0a7faa8f6e6cfa3
    1 point
  25. Great module, but rather I looking for something like your module which deals with page references and supports autocomplete (other inputfield for Page Autocomplete core module, without jQuery UI dependency *g*). But really great for simple tag style values Yes, that would be awesome!
    1 point
  26. Is the latest translation in https://github.com/apeisa/Finnish-ProcessWire? Has anyone made translations for 2.5? Is there any plan for keeping this up to date with the latest PW version changes?
    1 point
  27. I like my images having consistent names. But I probably will live without them. So it is up to you - please consider making this if you will have a little spare time for perfection )) Thank you for your module anyway. It should be on someone's list here.
    1 point
  28. Going to agree with Philipp there. Especially in the light of some of the "high profile" vulnerabilities uncovered lately, I believe that security is one of the true strengths of ProcessWire. While exec(), shell_exec(), system(), passthru(), etc. are powerful and very useful in controlled environments, they also introduce a whole new set of risks, and IMHO are rarely something you'd want to include in the core of an open source platform. That being said, there's nothing stopping you from using them in your own modules
    1 point
  29. It would be possible to add such a function with a custom module. It hooks after the Upload and then hands over the files to the shell. Disregarding any security concerns from the shell_exec which you should be avoided. You could try LazyCron (part of ProcessWire) for longer tasks in the background or use normal Cronjob to perform those tasks. There is cron.pw which is super cool to run functions regulary. Another idea, avoiding the shell_exec: A module that writes the files into a queue (database or file or directory) and then a Cronjob runs your programm that will search for jobs in this queue. EDIT: As we're here in the Wishlist section of the forum: I disagree to put something like this into the core of ProcessWire. Beside security concerns, this can be easily solved with the methods described above.
    1 point
  30. https://itunes.apple.com/us/app/renamer-batch-rename-many/id402286241 Or less expensive, if you're ok with random numbers http://angrymarmot.org/mac-oslinux-batch-rename-files-random-name/
    1 point
  31. That is the beauty of ProcessWire - you can do so much without a single extra module if you really want to. But I think the five that I tend to add first are things like: XML sitemap Hanna code (I use it loads) Procache Lister Soma's Help notes thingy
    1 point
  32. I deliberately try not to use modules unless I need them. There really is a lot you can do with the core/API alone, so I tend to consider modules as convenient helpers, usually to cover for when my puny PHP skills don't suffice. That being said, I recommend: Markup Simple Navigation – to dynamically generate almost any navigation structure Map Marker (Google Maps) – if you ever need users to be able to generate Google Maps, this is a lifesaver XML Sitemap – it's one of the basic SEO things, and no one should have to generate an XML sitemap manually Language Field Tabs – as if multi-lingual sites weren't awesome enough in PW already, this makes it even better Forgot Password (Core) – never, ever forget to install this; if a project has more than one user, someone will forget their password at some point
    1 point
  33. Hi Lucas, I have the app yellowled listed and I noticed it has an option to 'Rename from file list' which would allow you to have a spreadsheet of random names and use that list to rename all files in one go (I think).
    1 point
  34. I don't know much about angular. But most api's send some sort of token with the GET or POST data, which autorizes the http-request to the backend your calling. In your case this is your module. If the right token is send you can return all the things you want it to. It could even login itself.
    1 point
  35. Nice little wrapper library for adaptive design requirements, although I did change references from array to object, so it's more inline with PW config conventions. eg; public function mobileDetection(HookEvent $event) { $this->detect = new Mobile_Detect; $config = $this->wire('config'); $mobileDetect = (object) array( 'deviceType' => $this->getDeviceType() ); foreach($this->detect->getRules() as $name => $regex) { if ($this->detect->{'is'.$name}() === true) { if (in_array($regex, $this->detect->getBrowsers())) { $mobileDetect->browser = strtolower($name); } elseif (in_array($regex, $this->detect->getOperatingSystems())) { $mobileDetect->operatingsystem = strtolower($name); } elseif (in_array($regex, $this->detect->getPhoneDevices()) || in_array($regex, $this->detect->getTabletDevices())) { $mobileDetect->device = strtolower($name); } } } $config->mobileDetect = $mobileDetect; } So calling is simply: $config->mobileDetect->deviceType etc.
    1 point
  36. Thanks for the input guys - it didn't seem to work in the admin.php template and, yes, the actual frontend template would be too late. For now, I edited the MarkupHTMLPurifier module and changed the purify() function around line 108 to this: public function purify($html) { $this->set('Attr.AllowedRel', array('nofollow')); return $this->getPurifier()->purify($html); } That works a treat I think it would be a relatively trivial task to make it so we can have config options with this module, so I might have a look into that over the weekend unless someone beats me to it!
    1 point
  37. Hello I've been using pw happily for about 6 months and really appreciate the support I have dipped into on the forums. (Hopefully I will be able to reciprocate when I have more experience). To-date I haven't needed to bother anyone with questions which have already been answered elewhere, but I suspect this would change if I implemented a shopping cart. I have a client who requires a website on which she can sell her quilting designs as pdf downloads, receiving payments via Paypal. She already has books published on the topic and selling internationally, so this is an important step for her into publishing on the web. Compared to what I've read about the demands placed on e-commerce solutions it shouldn't be too complicated, so I would be interested to know whether the current version of shop-for-processwire could take me there? Any advice gratefully received
    1 point
  38. The module docs say: To specify custom settings to HTML Purifier, perform set() calls before calling purify(). So I guess something like this should work, if placed on top of your templates before you output your fields. $purifier = wire('modules')->get('MarkupHTMLPurifier'); $purifier->set('Attr.AllowedRel', array('nofollow')); I did not try this myself. If this doesn't work when placed in your template files I would try placing it in the admin.php in your templates folder.
    1 point
  39. Okay, so we all like to think we are super organised when it comes to planning our ProcessWire site, but sometimes life is not like - we are uselessly lazy and can't even make our coffee in the right order (is is add the whisky first or second?). So, here are a couple of really lazy ideas to make everyone feel better about messing up. First Lazy idea Oh, I forgot to create a field! (or two, or three....) On the template edit page where you add the fields, how about a Create New Field button that allows you to create a field and add it to that template. Probably opens a modal window to create the field. Second Lazy Idea OH, why didn't I create the field BEFORE I created all these templates? No Problemo! On the field Info tab where you can see which templates use the field, what about having another box that lists all the templates that do NOT use the field and are displayed in columns with little check boxes next to them - tick the boxes and save to add the field to those templates. Third Lazy idea Adding a group of fields to a group of templates. I have actually just changed this from what I was going to suggest because my original idea was not lazy enough - far too much work for the user. So, you get a new button at the bottom of your list of fields and a check box next to each field. Hit the check box and the button gives you the option to Add fields to Template. A modal opens where you can change the order of the fields and select which templates you want to add them to. In addition, you get the option to add them within a tab set or field set and give that a name. Click Add and all those fields are added to the templates in the order you have set them. (Note, if any of the fields have already been added to any of the templates, then it either does not add those fields and tells you which were not added to which templates, or it fails completely and tells you which were not and so on.) Fourth Lazy Idea Lazy blokes template creation with fields. So, you suddenly realise you need 20 more templates with 18 existing fields each but you haven't got a handy dummy template with the right fields in. Don't panic. On the new template screen, simply select the fields you want, complete with tabs, field sets, and the right order, then choose the templates you want to create as normal and done! Wow, that was lazy! Fifth Lazy Idea I can't remember what I am doing where, why and when! So, this is a new screen under set up called something like Field Matrix. Basically it is a large, scrollable chart that has fields down the Left and templates across the top. From this chart you can now see which fields are being used on which templates shown by ticks and crosses. PLUS! You can actually add and remove fields from templates by clicking on their tick or cross to change it. THIS IS REALLY DANGEROUS (and probably a bad idea) but it is also wonderfully lazy! Doesn't all that laziness feel good? So there you go: Five lazy ideas to help tired, overworked, and disorganised web people get through their day, Joss (I know, far too many changes in one go - but I enjoyed thinking about them!)
    1 point
  40. Thank you for the suggestion! Making a new textarea fixed my issue! And during the creation... I think I found what caused the issue, I will try to explain it in points: When you've created a textarea field and its input type is still 'Textarea', you have different settings available. (http://i.imgur.com/M27haJB.png) One of these settings is 'Strip tags', which removes all HTML tags. (http://i.imgur.com/oQO9YCU.png) When you check the setting and switch to CKEditor, the 'Strip tags' setting is still enabled in the background, but you can no longer see or edit the setting. That's what caused the problem for me. Sounds silly and frankly, even I don't know why I decided to enable it. Hi Kongondo, thank you for moving my topic and for your concern. Could you please delete the double post that happened due to the move of my post? Thank you in advance. PS: I love your Blog module! It is awesome in many ways and your work is greatly appreciated!
    1 point
  41. Just have committed a little update and added the new category "Premium Modules" to exclude list, so they're not downloadable (cause they're commercial) http://modules.processwire.com/modules/modules-manager/
    1 point
  42. Hi, doesn't see hhvm before but looks interesting... htaccess and php.ini support seems missing at the moment, but is planned. I'll read some more about it and maybe do some (simple) tests with it... *update* Simple installation (CentOS 6 yum repo) and a simple php test works fine, but to run PW, Drupal ... I think the htaccess file have to be converted, because apache, htacess, php.ini isn't supported by hhvm yet... But seems to be work in progress.
    1 point
  43. This one is fixed in 2.3.2 dev.
    1 point
  44. Microdata is always good to have, thanks for sharing this! Personally I wouldn't depend too much on data-vocabulary.org though. Their home page makes it pretty obvious that schema.org is the new toast of the town. With schema.org vocabulary breadcrumbs could be implemented like this: <body itemscope itemtype="http://schema.org/WebPage"> ... <div itemprop="breadcrumb"> <?php foreach($page->parents as $parent) { $end = ($parent === $page->parent) ? "" : " > "; echo "<a href='{$parent->url}'>{$parent->title}</a>{$end}"; } ?> </div> <!-- this follows strictly schema.org example --> Or with markup matching above example: <body itemscope itemtype="http://schema.org/WebPage"> ... <div class='breadcrumb' itemprop='breadcrumb'> <?php foreach($page->parents as $parent): ?> <li> <a href='<?php echo $parent->url; ?>'> <span><?php echo $parent->title; ?></span> </a> <span class='divider'>›</span> </li> <?php endforeach ?> <li> <?php echo $page->title; ?> </li> </ul> <!-- this isn't exactly what schema.org describes but should still be valid.. --> There's quite a bit of discussion floating around whether schema.org version of breadcrumbs is actually useful, but it is what their example currently suggests. Note also that breadcrumb is a property of WebPage, ie. you'll have to be in that context in order to use this properly.
    1 point
  45. This module reminded me of Select2 - it's like asmSelect supercharged: textboxes like this, filters, custom labels, ajax etc That being said, it would be great to have Select2 as a Page field inputfield in PW.
    1 point
  46. When importing images to pages, make sure the page exists first. So if you are creating a new page, save it in your API code ($page->save()) before adding the image to it. Otherwise, PW won't know where to put the image(s) since the /site/assets/files/* directories are based on the page ID. If you are adding an image to a single-image field, you can just set the value of it to the URL, i.e. $page->image = 'http://www.something.com/some-image.png'; If you are adding an image to a mult-image field, you can add() it: $page->images->add('http://www.something.com/some-image.png'); Either of the above makes PW copy the image to it's assets and create the proper object. And then don't forget to: $page->save();
    1 point
×
×
  • Create New...