Jump to content

MadeMyDay

Members
  • Posts

    371
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by MadeMyDay

  1. MadeMyDay

    velokurier.com

    Well, you could give it a try. It extends the animate()-function if the browser is able to and falls back to the common animate() method is transitions are not supported. It works with some plugins and might fail on others.
  2. MadeMyDay

    velokurier.com

    Very nice one Soma One thing I would at least try: Include something like transformJS or alike to animate the header with CSS3 transitons if the browser is capable. The result should be a lot smoother. If you don't use it, the positions of the elements are calculated by Javascript (of course) and positioned pixel by pixel. If something like transformJS works, the animate()-function of jQuery gets replaced by appropriate CSS3-settings and the animations get support by the (3D-)graphic card if available. Just a thought
  3. I like the idea of field groups, but perhaps in another approach: Grouping them in the fields overview. On more complex sites I have 30-40 fields which I group by adding prefixes to them like contact_address, contact_person and so on. But it would be nice to define a field group "contact" and sort the field there (collapsible and tabbable perhaps?). Then the possibility to clone whole groups would be ... wait for it ... legendary ;-)
  4. Depends on how you define the "maximum files allowed" in the "input" tab of the image field. If you allow more than 1 image, PW returns an array of images, regardless of the effective quantity. So in your code you should have: foreach($page->get("product") as $item) { if (count ($item->product_shot) > 1) { echo "<div class='productcontainer'><div class='prodpic'><a class='nowandthen'><img src='{$item->product_shot->first()->url}' alt='{$item->product_shot->first()->description}'> <img src='{$item->product_shot->first()->url}' alt='{$item->product_shot->first()->description}'></a></div>\n<div class='prodtext'><h2>{$item->product_name}</h2>\n{$item->product_description}</div></div>"; } else { echo "<div class='productcontainer'><div class='prodpic'><img src='{$item->product_shot->first()->url}' alt='{$item->product_shot->first()->description}'></div> \n<div class='prodtext'><h2>{$item->product_name}</h2>\n{$item->product_description}</div></div>\n"; } } If you only want to have one image per (repeater-) field it is better to determine "1" as maximum in the field input settings. Because as a nice side effect, the existing image will be overwritten when you drag a new one into that field, no need to trash it manually by clicking the trash icon. And then there is no array returned and your code should work without changes.
  5. Especially regarding Retina-compatibility, this is an important feature. Interesting fact is: Retina demands doubled size (in each dimension), but you can set the jpg quality to 15-20% for getting sharp results without losing quality. So a feature to determine the quality "on the fly" would be fantastic. I use the picture element (well, not a real element because not implemented by browser vendors yet) for serving different image dimensions to different sreen sizes / pixel ratios. So I would need a possibility to server a 20%-jpg to Retina displays while leaving the 90% version for usual screens (original image already reduced). Good example here: http://retinafy.me/e...eg-scaling.html (I have a Retina display and the examples are stunning!)
  6. Well, as suggested: I would put this code in a page with a non cached template: <?php $id = $sanitizer->text($input->get->id); $whichPage = $pages->get($id); $whichPage->views = $whichPage->views+1; $whichPage->saveField($whichPage, 'views'); And in your pages / other templates you place something like this (jQuery assumed): <script> $.get("/mycounter/", {id: <?= $page->id ?> } ); </script> "mycounter" would be your counter page with the counter template. [totally untested]
  7. Talking about forum features, I just leave this here: Is it possible to enable a fulltext RSS feed? At the moment only the thread headlines are provided, which is a bit little information ;-)
  8. Look in your .htaccess and uncomment this line: RewriteBase / edit: Too slow. Okay, glad it is fixed.
  9. Depends on how this page view counter works. You could either work with a ajax request to an uncached page to update the counter or you use a (then rather complicated) construct with markup cache.
  10. My first contact to a preprocessor was "turbine", a PHP based one which is quite comparable to stylus and SASS. Now I use stylus for every project. I don't like curly brackets, I don't even need colons. For me it is really pain in the a.. to modify older projects or projects from others which use plain CSS. I am writing my CSS pretty fast and the cascading is so much easier to follow once written. Since one writes HTML from the outer elements to the inner ones, I am very comfortable with writing CSS the same way. For example: <header> <nav> <ul> <li> <a>home</a> </li> <li> <a>products</a> </li> <li> <a>services</a> </li> </ul> </nav> </header> isn't it natural to write the CSS the same way? header max-width 1280px height 200px margin 20px auto padding 10px position relative nav width 750px right 0px top 100px height 50px position absolute > ul > li float left position relative height 50px display block line-height 50px text-align left padding 0 20px transition(all 0.3s ease-out) background weisstrans > a headline(18) white-space nowrap padding 10px 0px transition(all 0.3s ease-out) &:hover, &.active background blautrans transition(all 0.3s ease-out) You also see other benefits like mixins, variables and so on. I would miss the advantages a lot, really! And it doesn't matter if LESS, SASS or stylus. You will never go back, promised! Sorry, indentation is wrong with this forum editor, but I think you get it.
  11. I used the default values a lot in MODX. Well, because they were possible (but with all disadvantages mentioned above). I think the default value can easily be done in templates, but as mentioned above some inheritance logic would be nice (which MODX also has, just put "@inherit" in the standard value field). One can also do this in the templates / modules but it is difficult to handle that in the selectors. Say you have a text field which standard value should be "green". In your template you can handle that easily like Soma said with if(!$page->color) $page->color = 'green'. You can also select with color=,... , but if I want to inherit this value I am lost. So something like "inherit value from parent(s)" would be nice. If a parent has color = blue, the selector for color=blue should also find the children of that page with that value.
  12. Perhaps as an additional option in the field configuration? So if you change the default you are prompted to a dialog: [ ] change all fields that hold the old default value to the new default [ ] Leave the old defaults Btw, somehow related: A optional "inherit" option also would be nice. I know both features (default and inheritance) can be done on a template basis, but as a field option it would be a little bit developer/designer friendlier ;-) But it makes the above problem not easier... hm.
  13. Thx you two. @Arjen: I think when understanding the language it should be pretty clear that there is no more information. But thx for the hint!
  14. Next site is online: http://www.troltsch.de (Small Real estate company hier in Karlsruhe) No special modules, but some CSS3-fancyness (hovering images). Their old site didn't have any information, so the goal was to make the maximum out of nothing.
  15. Yeah, just finishing the project I developed this for by the end of th week (hopefully). Then will clean everything up and publish a first - yet relatively simple - version.
  16. Thx you two @charliez: There should be Google Maps instead... which OS/browser are you running?
  17. Just as a short note (sites are not much more than standard PW installations) www.grahm-anderson.de (lawyer, responsive layout) www.factoring-pool-mittelstand.de (Factoring means selling bills which are overdue to a bank) The latter uses the redirect url module for relocating old urls and Soma's navigation module. More to come soon.
  18. Since allow_url_fopen() is deactivated by some hosting companies here is a little workaround for using Curl: open MapMarker.php and insert somewhere (e.g. after the last function) the following function: private function file_get_contents_curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); curl_close($ch); return $data; } comment out the follwing check: if(!ini_get('allow_url_fopen')) { $this->error("Geocode is not supported because 'allow_url_fopen' is disabled in PHP"); return 0; } and change this line: $json = file_get_contents($url); to $json = $this->file_get_contents_curl($url); works fine for me.
  19. @Ryan: Which browsers does PW actually support? There might be a solution without JS. And another related suggestion: AFAIR fieldsets are not floatable, but that would come in handy for arranging multiple floats. Perhaps a suggestion for a next version update. Will also take look, I really love the flexibility of the admin but there is always something more to achieve ;-)
  20. ? Sorry, but (already pointed out): 1. you can configure which widgets you use 2. you define how complicated you make it (depending on the needs of your site, editors, groups and yourself) 3. It is a Process module, you can use it as often as you need it 4. Finally, again, it is a module. You don't have to use it. You can stick at the pages process as start screen (what I also do for small sites).
  21. hehe, when posting my answer the structure screenshot wasn't there. If there are only children of a kind it is easier/better to use ->children()
  22. Well, I think you have to itereate twice. First for the parents (issues), then for the articles. Like (pseudocode) $issues = $pages->find("template=issue,sort=sort") foreach $isssues as $issue{ echo $issue->title; $articles = $issue->find("topic_name=1,sort=sort") foreach $articles as $article echo $article->article_subtitle; } }
  23. Can you show your code and your intended result?
×
×
  • Create New...