Jump to content

bernhard

Members
  • Posts

    6,648
  • Joined

  • Last visited

  • Days Won

    365

Everything posted by bernhard

  1. hey apeisa, i found a bug when using your module with the new 2.6 version (left how it looks like with 2.5.3 which is ok) this makes it impossible to switch between grid/list view making it also impossible to delete images, so that's a serious thing you can use my test-installation from here: http://stuff.zwergo.net/cropbug.zip user admin pw admin! database is in /site/assets/backups/database/test-2.6.1.sql DB name is test page "test" has template "test" with the bug on it. your help would be greatly appreciated
  2. thanks tpr, but that doesn't help me a lot... why am i seeing this list of fields under the "basics" tab and not the standard interface for adding/deleting fields?
  3. hi, today i found this screen that was totally new for me after importing a template via import/export tool: is this because of this part in the export json: "childTemplates":["catalog"], ? never read about "fieldgroups" concept. any links for me to read? i don't know how i did that - i only did the import ^^ so how would i create such a template manually? thank you
  4. never tried, but looks interesting after a short research (win/mac/linux): https://prepros.io/
  5. me once again Notice: Undefined index: it in /var/www/html/site/modules/Multisite.module on line 68 https://github.com/somatonic/Multisite/blob/master/Multisite.module#L68 i got this error today when i switched debug mode "on". PW 2.6.2 what is the "it" get parameter or what does it stand for?
  6. if you are new i would suggest to keep everything as simple as possible: so start with a single image-field and a SINGLE image to get familiar with it. note that "images" and "image" in the code above assumes that your field's name is set to those values. what errors do you get?
  7. <a href="#"> <img src="<?php echo $col->images; ?>" /> </a> should be something like <a href="#"> <img src="<?php echo $col->image->url; ?>" /> </a> attention: you can set up image fields to have ONE ore MULTIPLE images in it. if you set the max number to ONE, then the example above will work. if you set it to multiple files, you would need something like this: foreach($col->images as $img) { echo '<a href="#"> <img src="' . $img->url . '" /> </a>'; } welcome to processwire and the forum happy processwiring!
  8. hi preto, nice to see you here seems that you have an error in your home.php file. maybe a missing semicolon or something like this... do the other templates like basic-page.php work?
  9. maybe you could use a prefix meanwhile? like german will only show files with prefix de_ and english version will only show files with prefix en_? no experience with multilang though
  10. hi soma, thank you - all the problems are not time critical for now shouldn't checking the strpos to be < 1 be enough for that? https://github.com/somatonic/Multisite/blob/master/Multisite.module#L62 if(strpos($httpHost, $subdomain) !== false AND strpos($httpHost, $subdomain) < 1) { at least it works for me here on my dev. that makes me curious?! one other thing: I'm wondering why the module does not take the valid multisite-domains from the processwire config? i always have to add new domains in both locations. ok, that's not a big deal, but i'm sure there is some more important thing behind it? any problem i don't see that could appear when "synching" multisite hosts with pw config hosts?
  11. i have the following problem: www.site1.dev -> works sub1.site1.dev -> works but site1.dev -> works sub1.site1.dev -> doesn't work any fix for this?
  12. ah, now i understand your intention! thanks for sharing the code. I'm wondering why you are hooking Page::render? Wouldn't it be possible to hook somewhere where all the urls are created, so that $page->url automatically returns the url with the filter-segment if it is an internal url? note i'm not an expert, so i'm sure there is a good reason for this.
  13. would be great if you shared the code with us - i'm curious
  14. thanks for the update apeisa, installaton worked smoothly now. one problem when having stacked edit-buttons: i have a widget with edit-button and all the blog-posts in a list inside this widget. so they display when hovering the widget and not only when hovering the list-item (i was hovering the first boxed blog-item in the screenshot) .frediparent:hover > .frediwrapper > .fredi {display: block;} that would solve it, but i don't know if that leads to problems anywhere else in your module?
  15. sorry then i think i don't get what you are trying to achieve - I'm sure others will jump in
  16. feel free to share/use it. created with free picture of http://pixabay.com/en/ and (partly) free editor https://www.canva.com/
  17. do you mean something like permalinks? maybe you could clone your page and save it as its own child on every pagesave? you would then have something like this: /your-article (= current version) /your-article/2015-05-01-01-01 /your-article/2015-05-25-16-44 just an idea... of course you would have some unnecessary extra data, but maybe that would be a good solution?
  18. yes that's definitely possible with what i said. setup 1-step adding of pages. set template to "action" and default title to eg date(...) or leave it as it is and all newly created children will have their title populated automatically. if you hide that field the client will not see anything of this "magic" but maybe your "for custom pages" is too much for this method... anyway: as sinnut said a simple module would do that easily! just wanted to make sure you know about the 1-step thing before you create a module that does the same
  19. this is already on the roadmap for PW3.0 Fall/Winter 2015: http://processwire.com/about/roadmap/ but of course i don't know details
  20. you can also use the 1-step adding of pages if all of the children have the same template: https://processwire.com/blog/posts/processwire-2.5-changelog/#adding-pages then you can set the title-field to hidden on the template-settings. or am i misunderstanding you?
  21. hi all, i managed to hook ProcessPageList::find to return the right set of pages but i don't know to set "showRootPage" to false via hook if i set this line to "false" it works as expected, but i want to set this based on the role of the logged in user and of course i don't want to hack the core: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageList/ProcessPageList.module#L61 I'm making my first steps how to hook into methods but i don't know how to set properties of the class via hook in general? thanks for your help!
  22. sorry, forgot to mention i'm on ProcessWire 2.6.1 dev
  23. just tried it and i like it! (no wonder ) update from the previous version on dev went smoothly. thanks for implementing this into your module! on my live server i got this error on installation: Error: Class Fredi contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (ConfigurableModule::getModuleConfigInputfields) (line 159 of /var/www/vhosts/+++/httpdocs/site/modules/Fredi/Fredi.module) This error message was shown because you are logged in as a Superuser. Error has been logged. PHP Version 5.3.10, ubuntu
  24. hmm, good point most of the time that would work, i think. though there are situations where i simply don't have a parent in my portion of code. say i have a 2-column setup like this: ___________ |_________| | | | |___|_____| |_________| and i have a widget like this: <h1>title</h1> <p>body</p> that's all the code i have in my template-markup-file. i would have to wrap this into an additional container, because i don't know if i place it in the left or in the right column! in my case it looks for its parent regardless of wether it's placed left or right (that's defined via backend and stored in the DB). <?= editlink($page->id) ?> <h1>title</h1> <p>body</p> if you have more of those widgets in one column you would have to wrap them into their own divs anyhow - so both approaches would be quite the same. maybe that discussion is getting a little bit theoretically here how would you place the edit-button in your approach? a javascript injecting some code into the dom with the data-edit-id="x", right? wouldn't you also have to adjust paddings in that case? edit: i like your approach. if you did something like this <div class="..."<?= data_edit_id($page->id) ?>> resulting in <div class="..." data-edit-id="1001"> // logged in <div class="..."> // not logged in you would also keep your markup clean!
  25. that's the benefit of my approach: you don't have to touch the markup of your parent dom-element. just add one line of code (<?= editlink() ?>) and you are good - regardless WHERE you put it. that's especially useful when you have a widget-system like i have in the example. i have all the widget-markup in one folder and it can be that the first line is <?= editlink($widget->id) ?>. could be hard to find the right parent to add some code via php with php i would have to add data attributes or classes or such to all the parents i want to be "hovereditable". and you would also have to check if the user has edit-access. lots of unnecessary work compared to 1 js function and 1 php echo for each editlink. ---- it is absolutely positioned, but in a relative positioned div, so that it remains in the current DOM element. otherwise all edit buttons would stick to the topright of the window! blue = parent DIV green = relative helper DIV edit-button = absolutely positioned INSIDE the GREEN helper. due to padding of the blue container it has to be positioned with negativ margins for top and right so that it appears to be inside the blue parent
×
×
  • Create New...