Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. I would say a ProcessModule for the AJAX request. That module should extend Process and Make sure the config array contains 'permission' => 'page-edit'
  2. Cropping for different devices shouldn't mean crop to smaller sizes by default. Say you have a photo with a group of people and one of that group is the subject. It wouldn't be weird to crop out only that person for smaller devices.
  3. .htaccess to the rescue? Redirect 301 /home/business-directory/business-categories/ http://www.yourdomain.ext/business-directory/
  4. Think you're adding a hook not listening for one. $pages->addHookAfter or the before are listeners. Before or after shouldn't matter as they are both before the save.
  5. I don't know what the context of this search query is, but if it is from a search box, you could consider to use a Google Custom Search Engine. When the search queries become 'to complex' I would go for that option. Google gives back the URL, together with other found data. You could use the URL to get back to your own 'ProcessWire' data and enrich the result as wished. When you are scared having to pay for the searches, you could always store the google results temporary with MarkupCache or WireCache.
  6. In basics my opinion is very simple, when removing stylesheets & scripts, the leftover should be good structured and meaning full Markup. Not markup that is designed to make it look better. What you see a lot in the so called frameworks is a grid system based on rows and columns. In most use cases those row divs are purely there for visualising, and they div(ide) content where the content should not be divided. Classes are meaningless for Markup, what I mean by this is that a <p> stays <p> even when the <p> has a class. So my opinion: classes are perfectly valid for visuals without altering the meaning. Pseudo elements can really help to make your markup as meaningful as possible. With pseudo you can left out that break, clear a float, etc etc, without using markup. Some people point out that html should be re-useable, so classes can be a 'pain in the ass', but my opinion is different for this as I haven't had a single project where I re-used big blocks of HTML.
  7. @Teppo attributes and pseudo-classes and classes have the same specificity, so the order of your styles make the difference.
  8. Maybe you have an autoload module or an init file somewhere that puts the output formatting off.
  9. That shouldn't be, I'll file a bug on GitHub for this. And thanks for correcting me
  10. In the settings you can enable json config, then in your browser console type console.log(AdminCustomFiles) and a JSON object including the process name will show up.
  11. For 'experimental templates' I often use Select File Fieldtype, when that field is attached to a template, pages using that template can select a file that will be used as template. See the field settings for the options.
  12. Awesome update! But one feature request: Optional disable crops with flexible widths & heights' and enable crop sizes from 'presets'.
  13. // You don't need to loop the select $options = "<option value='Select Colour' selected='selected' disabled>Select Colour</option>"; foreach($page->colour as $colour) { $value = $colour->colourtext; $options .= "<option value='" . $value . "'>" . $value . "</option>"; } echo "<select id='colour'>" . $options . "</select>"; ps, could have a bug or 2 typed in browser.
  14. 01. Is the name of your field in the actually 'meta_title'? 02. ProcessPageEditTruncate.js should be in '/site/templates/AdminCustomFiles/'!
  15. @laban, sorry didn't spot your question earlier. But here's the answer. // DOM is ready $(function () { // field with the name attribute title $("[name='title']").truncate({ characters: 55, prefix: '', suffix: ' character(s)' }); // field with the name attribute an-other-field $("[name='an-other-field']").truncate({ characters: 160, prefix: '', suffix: ' character(s)' }); });
  16. We all do stupid things. Every time again...
  17. echo json_encode($out); return $this->halt();
  18. Love the new panel thingy! Especially the 'side effect' that you can use it as some sort mediaquery tester while dragging the pane .
  19. While developing I love to have it all in front of my nose. Can do that, on the other-hand it shouldn't be that hard to replace </body></html> with Tracies markup plus </body></html> I guess.
  20. Hi Adrian, When tracy is injected to the page, it breaks the W3c validator. It's not a real big deal but never-the-less: Are you willing to make Tracy compatible with the W3c validator .
  21. A other possibility for ProcessPageEdit would be to abuse the method addOptionsString. The default InputfieldSelect (the page one:-)) has a method 'addOptionsString' that methode takes a string as argument. To create options from there you could create a text like the text below (There must be at least 3 spaces before the options, 3 is recommended) A 1234=Alfa Romeo 1235=Aston Martin B 1236=BMW 1237=Bugatti Example in the spoiler.
×
×
  • Create New...