Jump to content

owzim

PW-Moderators
  • Posts

    490
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by owzim

  1. I cannot use parent=1 or parent.template=home as a dependency in the visibility option right? Because it does not work for me. =( Also not in the default admin theme.
  2. I am using the Futura remixed theme and the admin columns module, and before I added the inputfield.js like stated here http://processwire.com/api/selectors/inputfield-dependencies/ the widths of the columns where set fine, like 70% and 29%. No with the newly added JS the width are very weirdly huge: 98.65625% and 57.65625% What's wrong and how to fix it?
  3. This is great and a total no-brainer, very comfortable. I know there are a couple of solutions out there including command line based ones (also within Grunt and Compass), but this has been the most usable for me yet. http://spritecssgenerator.formfcw.com/ You can name your symbols like css selectors, and of course use Sass with it too. I name my symbols like this (Sass placeholders): %sprite-next %sprite-next:hover %sprite-prev %sprite-prev:hover and so on, and then I extend my desired elements like this: .my-element { @extend %sprite-next; } It even summarizes symbols with same sizes into single selectors.
  4. No, I always saw hooks as sth. to be added before or after some actions (and I already used them for that), but not to create new methods. I have wrapped those into my own static class methods until now =) That said I have not been actively looking into module development and hooks too much so far. Well, things are clearer now.
  5. Great teppo, thanks. I have not used CKEditor yet, but gonna try it out soon, looks prettier. I remember fiddling around with custom text injection with TinyMCE a couple of years back. What I used was just a simple select box and the selected text was injected at the current cursor position, so no extra modal was necessary. Is it not possible with CK without the extra step?
  6. Dang, where and when did you hack it into repeaters?
  7. I just thought of yet another approach to flexible page design: Repeaters and the new Field Dependencies. So you set up a couple of block types via a page select (text with image, three columns text, employee, gallery or whatever blocks you want to use), those options are available in each repeater item and according to what is selected you show and hide fields within the respective repeater item. Then in the template you can use the new option to pass alternative template files to a page to render the blocks: foreach ($page->repeater as $repeaterItem) { echo $repeaterItem->render("blocks/{$repeaterItem->type}.php"); } This might be closest to what I would expect from patching a flexible page layout together.
  8. Ryan, great insight. I recently wondered if one could extend the PW API, did not know it's as easy as this.
  9. I did not read the article but I guess it states how horribly wysiwyg editors screw up page designs, by code and in a visual way (because clients get too "creative"). That's exactly why this thread was created and there is some interest in it. To give the client a guide, within specific constraints (created by the designer/dev) to layout the page. If this goes well, a wysiwyg is not even necessary anymore. So it actually solves the problem you might see.
  10. Wow, looks great. Looking forward to the implementation.
  11. Hey adrian, this is great work, thanks a lot for the effort. I tested it with small chunks of datalists, selection values and so on, works like a charm. On one specific page with FieldSetTabs I get this, after hitting the Export button in Step 2: Error: Cannot break/continue 1 level (line 641 of /pwtesting/site/modules/ProcessPageTreeMigrator/ProcessPageTreeMigrator.module) This chunk seems to be responsible: if($type == 'fields'){ if($page->type instanceof FieldtypeFieldsetOpen) continue; $data = array( 'name' => $page->name, 'label' => $page->label, 'description' => $page->description, 'template' => $template_name, 'flags' => $page->flags, 'type' => "{$page->type}", ); } Also this might not be relevant yet, but on a page on which I use soma's new alpha module for ContentBlocks after exporting I get this: Error: Call to a member function get() on a non-object (line 734 of /pwtesting/site/modules/ProcessPageTreeMigrator/ProcessPageTreeMigrator.module) I'm on PW 2.3.3.3 Perhaps it would be useful for users to see in the github readme what's already working and what not working yet. Perhaps a little roadmap as well. Thanks again, this will be a huge timesaver and the more modular approach for migrating little logical/data chunks rather than whole profiles will come in very handy when developing locally and on server parallely.
  12. Fiddled around a bit more. 1. When not logged in the blocks don't get rendered, this small hack fixed it: foreach ($this->blocks as $b) { // if($b->viewable()) $out .= $b->render(); $out .= $b->render(); } So the blocks seem not to be viewable. I checked, they are neither hidden nor unpublished. 2. When deleting a block from the ASM list via the trashcan icon, it goes back into the input-select (expected behaviour). But when saving or leaving the page edit, it also disappears from the input-select, where does it go? 3. When creating a new page with the pwbc_blocks_select, after hitting save, this comes up: Error: Call to a member function children() on a non-object (line 78 of /pwtesting/site/modules/BlocksContent/BlocksContent.module)
  13. I think I know where that error comes from (page select field custom code) but it doesn't show for me. Can you change the custom php code in pwbc_blocks_select to following and see if it solves it? $parent = $page->blocks_parent; if(!$parent->numChildren()) return; return $parent->children('include=all'); That fixed it!
  14. soma, some great progress so far, thanks. Had some initial problems setting everything up, but I recommend everyone reading the readme on github carefully =) _____________________________ Tested this: two block templates: block_person.php (title, body, email) block_gallery.php (title, images) added new block_galley via "Add new block" appears as new sortable item and appears in input-select (greyed out) added new block_person via "Add new block" appears as new sortable item and appears in input-select (greyed out) everything fine, also the block rendering on front end works as expected _____________________________ I initially had the following problem (could not reproduce it again yet): after saving the container page, both blocks disappeared and went back into the input-select I had to do the following a couple of times: selecting them form input-select (and therefore adding them as items in the ASM list) and saving the container page then one of the items disappeared completely (out of ASM AND input-select) _____________________________ I don't know what your roadmap is so I wrote what comes to mind: Do you plan on implementing the blocks "inline" like in the repeater field or will you stick with the ASM select? The modal when creating (custom by module?) is different from the one when editing (default by PW) Had an error on a different fresh install. Haven't dug deeper into it, since I got it working on another install. May be some faulty setup. It comes up on page edit when pages have that pwbc_blocks_select assigned: Error: Call to a member function children() on a non-object (line 2 of /pwtesting/wire/modules/Inputfield/InputfieldPage/InputfieldPage.module(155) : eval()'d code) Why prefixing the blocks with block_ when they reside in a directory called blocks already?
  15. soma, thanks that you took the time and effort to dig deeper into this. Sounds great. I'll glady help with testing too.
  16. That's going to save a lot of time, thank You! Do you intend to make the output customizable in the future? Like soma did with his MarkupSimpleNavigation?
  17. I find myself browsing through the system to reach certain pages, settings or modules over and over again. It would save a lot of time if I could bookmark these pages with like a star button on top (in edit mode) or something on a system level or/and user level. Then perhaps in an extra item in the top navigation called bookmarks, would list them all. System level because other users could use them too. Any thoughts on this? Perhaps even some suggestions how to implement that?
  18. There is also a cross platform way with a command line tool which starts a server, very similar approach: http://stackoverflow.com/questions/11361822/debug-ios-67-mobile-safari-using-the-chrome-devtools/16903378#16903378
  19. I just discovered an awesome app: http://vanamco.com/ghostlab/ It lets you connect your devices (or simulated/emulated devices), then you test on one browser and the other views act synchronised. Debugging is easy too, you pretty much have a chrome dev tools like thing for all the devices on your desktop. Gosh this is front end heaven =)
  20. As I said I would not go too fancy on this, because many businesses show their hours in very obscure and user unfriendly way. Why show periods or series of days with same hours and weird combinations of both when you simple can list each day with respective hours? I sometimes find it incredibly annoying when I just want to know if something open today or tomorrow and first have to decipher (even if its only a second).
  21. I wouldn't go too fancy about this. Perhaps simply a repeater with two fields: day and hours so they can add multiple day/hours pairs. (Edit: one simple textfield would suffice in this case too, seperate days and hours with some parsable seperator (for visual seperation in the front end), each pair seperated by new lines) Another idea would be you have a repeater with four fields for each repeater item: begin_day (Select field (PageField) with the 7 given days) end_day (Select field (PageField) with the 7 given days - optional for a span of days) begin_time (integer field) end_time (integer field) format the stuff accordingly in the template so they can very flexible enter anything here Mon-Tue: 7am-8pm Wed: 10am-4pm Thu-Sat: 10am-10pm
  22. Great addition Pete, thanks. Already using it. It should be in the modules directory.
  23. Wow, great work. If you do not intend to release it, perhaps you could release some of the functionality as modules? Like the HTML-CustomField caching.
×
×
  • Create New...