Jump to content

dragan

Members
  • Posts

    2,010
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. $text = $doc->createTextNode($form_fields); $form_fields is an array: https://gist.github.com/somatonic/5233338#file-form-upload-php-L25 Depending on whether you limit your upload to just one file, or multiple files, you have to add some $form_fields foreach stuff to create one XML for each file...
  2. Beautiful work. Very clean design and nice UI. Among many things, I like the search results display option "View text-only results for this search" and "View thumbnails for this search". How many pages do you have? Google shows "About 48.000 results" when searching site:.ukmoths.org.uk
  3. Sorry, I thought it was about single fields (perhaps mistook "partials" as fields...)
  4. The render method is relatively new and only available since the 3.0.5 dev version. (current version = 3.0.8) It's nicely explained by Ryan in the 3.0.5 + 3.0.7 release posts: https://processwire.com/blog/posts/more-repeaters-repeater-matrix-and-new-field-rendering/#processwire-3.0.5-introduces-field-rendering-with-template-files https://processwire.com/blog/posts/processwire-3.0.7-expands-field-rendering-page-path-history-and-more/
  5. PW uses relative paths and URLs. You can freely move things around however you wish (unlike, say, Wordpress...) Internal links (e.g. via WYSIWYG editor) will not break. As already mentioned, just make sure you use PW API vars like $config->httpHost / $config->urls->root / $config->urls->assets properly. And maybe add all possible domains in config.php from the beginning: $config->httpHosts = array('localhost', 'sub.domain.com', 'domain.com');
  6. Did you really include all these libraries? http://foundation.zurb.com/sites/docs/reveal.html#js-module
  7. You could write a PW page/template that handles nothing but the selectors and returns results as JSON. (written in PHP, with header("Content-type: application/json"); at the top) On the page where this filter is used, you would include some JS that handles the user-selection and talks to the above-mentioned script via AJAX. json_encode + json_decode are your friend
  8. I would activate debug-mode, and check the site/assets/logs folder (especially errors.txt) - maybe this would give you some clues.
  9. Works like a charm. Just tested it with a parent page having 4k children. Awesome!
  10. There are handy Grunt and Gulp tools, e.g. http://mattsoria.com/killersvgworkflow/ For a site that used tons of icons (including :hover versions), we used Grunt tasks that: - scanned a folder full of SVGs - created an SVG sprite - wrote a .scss file with classes for each icon (based on some simple naming conventions) - plus: did the same thing, but as PNGs (IE9 / old browser fallback) I wouldn't use SVGs in HTML emails though. There are still various email clients (web-based, standalone desktop or mobile apps) that don't support it. https://css-tricks.com/a-guide-on-svg-support-in-email/
  11. We use it in a variety of ways. As inline (base64-encoded) :before / :after content, as bg-images or plain img-tags. For icon-stuff, we switched completely from icon-fonts to SVG a while ago.
  12. Yup... On a sidenote: The wp-admin Wordpress template / code / PHP editor is by itself a huge security-risk. I would immediately uninstall it.
  13. hmm, view source of what? that #partner seems strange... I don't think it comes from a default admin theme (besides, there's no PW inline styles by default afaik) Also maybe take a look at site/assets/logs/errors.txt
  14. By default, if I try to access http://mysite.com/site/templates/ or /wire, I get an error 404. So I guess you don't need to do anything further. As for a folder m/ (which must be a custum folder you created, i.e. this is not part of PW core) - just turn off directory listing in your .htaccess, or do a 403. However, if you reference content from such a folder m/ (e.g. a PDF, an image or whatever) in your regular PW site, a 403 will block access too...
  15. Also, the frontend fails to load a JS file: https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.9.4/js/i18n/defaults-*.min.js = error 404
  16. OK, turns out the Front-End Page Editor module is injecting PW-backend specific stuff (all over the place) - in the HTML source too, not just when doing echo $page->body etc. For now (for 3.x tests) I'll use something like this, when I need JSON output: if($input->urlSegment1 === 'json') { header("Content-type: application/json"); $ar['title'] = $page->title; $ar['body'] = $page->body; $ar['summary'] = $page->summary; $ar['created'] = $page->created; $ar['modified'] = $page->modified; // new way how to render fields (optional) - with "baby" templates for each field $ar['matrix_test'] = $page->render('matrix_test'); $output = json_encode($ar); echo $output; exit(); }
  17. I just installed your module in the latest 3.0.7 dev. It works as expected when accessing a page as guest, but when I'm logged in as admin, I get JSON output from richtext-fields like this: summary: "<div id=pw-edit-2 class='pw-edit pw-edit-InputfieldTextarea' data-name=summary data-page=1001 style='position:relative'><div class=pw-edit-orig>This is a placeholder page with two child pages to serve as an example. </div><div class=pw-edit-copy id=pw-editor-summary-1001 style='display:none;-webkit-user-select:text;user-select:text;' contenteditable>This is a placeholder page with two child pages to serve as an example. </div></div>", I don't remember this module doing this in 2.x versions... if you get the chance, could you find out what's causing this? Oh, and also: fieldtype Matrix Repeater is completely ignored. Is that fieldtype too complex to render as JSON?
  18. I was very excited about the Repeater Matrix, so I immediately wanted to try it out and upgrade my devns v. 3.0.4 to 3.0.5. It's the minimal site profile (multilang). I got errors re: $content .= renderNav($page->children); $sidebar = renderNavTree($page->rootParent, 3); Error: Call to undefined function ProcessWire\renderNavTree() (line 20 of C:\Program Files (x86)\Ampps\www\ProcessWire-devns\site\assets\cache\FileCompiler\site\templates\basic-page.php) Seems like it's related to my previous post in the Pro Fields Download forum thread... Update: I have changed all templates to have this setting in "Files" tab > Use Compiled File?: instead the recommended "yes (and include files)" I have chosen "yes (template file only)" Everything back to normal now. Seems like relative paths (like the _func.php from the default site-profile) do not properly get cached with the "compiled file" recommended setting. Perhaps it's safer to use include_once( $config->paths->templates . "_func.php"); in _init.php, instead of include_once( "./_func.php");
  19. Exactly. Meanwhile, I will test out your script on a test-install and see how it goes. Thanks for posting.
  20. Ryan never ceases to surprise me - looks like my prayers were answered: https://processwire.com/blog/posts/processwire-3.0.4-repeaters-revisited-preview-of-profields-matrix/#new-profields-repeater-matrix-field
  21. First of all, Merry Christmas everyone. Because someone in our company recently suggested to try out Craft CMS, I have played around with their online demo, and was pleasantly surprised. PW has most of the Craft features already, and much longer. Much of what they advertise as unique features is pretty much standard in PW-land (and open-source, too). However, there is a thing they call Matrix*, which (afaik) PW can't do (correct me if I'm wrong). In editing mode, you are able to select / add / re-arrange any kind of input field, however you want. With most input types, you can further customize it (e.g. place the content block left, center, right or full width). Perhaps that's not a feature every type of site needs - most of the time I guess having a fixed set of input fields and a certain predefined frontend element-order is enough. Another feature I found impressive is live preview. You get a split view: left the admin edit view, and right the frontend page. Though that is impressive, I found it rather something "nice to have" than essential. Now my question to all PW-devs: Is there some kind of technique / module that would enable the "Matrix" functionality in the PW-editor? I've purchased ProFields, and played around with it. I was hoping to construct something like the Matrix with either Multipliers, PageTables, or any of the other relatively new modules/fieldtypes. Perhaps I missed something crucial - I don't visit the PW forums as much as I used to - so if you know of any tutorial, module, PW profile etc. that would allow this kind of editorial flexibility, please share it. I know I could probably add custom WYSIWYG buttons. Or use Hanna Code. But that wouldn't come close to the nice UX the Matrix offers. * If you don't want to setup a Craft demo, here's a video (oh, and in case this sounds like an ad for Craft - it's not. I am just genuinely curious.)
  22. dragan

    paradiesli.net

    2-3 years in the making (content-wise, not development) - and now finally live: http://paradiesli.net/ The site is in german only (though the initial idea was to have a french version too). It's a simple site, no black magic frontend- or backend-wise, but I quite like it. Mainly lots and lots of pictures, fullstretch background images and a simple navigation. btw - "Paradiesli" would translate into something like "little paradise". If you'd like to know more, here's a little summary in english.
  23. Came across this little survey on https://www.designernews.co/stories/58701-survey-dn-cms-for-clients recently. I have no idea how many readers DN has, but I thought it can't hurt to post something about PW there. Feel free to add to the discussion...
  24. Looks nice. A little nitpicking though content-wise: The german texts / translations are not what they could be. Some pieces sound like they're straight out of Google Translator... - at least the testimonials.
×
×
  • Create New...