Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. I quickly tried last night, and there's still some things. - when I have the crop image field in a tab, and upload an image the layout is messed (tabs overlap title). I can't provide more infos ATM (will make screenshot later, but I'm busy) - I don't like the thumb links... should be better (more clear) . And is it possible to put them inside the "fieldset"? I would like if it's something like : thumbnail - edit" big - edit - when there is big images, it's impossible or very akward to use it. - when I upload (html5) an image, I can't use preview fancybox before it's saved.
  2. Wohoooh! What have you done? Another eastern egg? Can't wait to try out later if I'm not fallen as sleep...
  3. apeisa, I got a process module "Image editor" that leads me to this thread seems like that is from your crop images module?
  4. There's a filter option on top of Templates... check show system templates . You will see a "user" template.
  5. Thanks for your time Ryan. Yes I agree it isn't an easy thing. I'm now doing it level for level. First ressorts, then subpages. There aren't that much for now. BUT, in the future they will have more reports with ~150 page per language and It would be great if there's would be a simpler solution for doing this. The pages I import from an html files structure into PW, so I'll may consider having this done before import using a name/key field something.
  6. Thanks Ryan. Yes I'm trying but the sort order makes it impossible. Though there subdirs that are sorted by name so they would work, but the ressort pages arent and they don't appear same position in page array with a find. No I can't use names... since they're language specific. I tried following: <?php $de = wire("pages")->get("/de-ch/halbjahresbericht-2011-2012")->find("include=all"); $en = wire("pages")->get("/en-ch/halfyearreport-2011-2012")->find("include=all"); foreach($de as $key => $p){ $e = $en[$key]->name; echo "<p>page: $p->name"; echo "<br/>page: $e</p>"; } yes I got a page reference field to reference them, but first nee to find a simple solution to not do it manually page by page. And yes the structur is 1:1. It's not for runtime on the site, but after import of these pages. --- Attached image so you see the two trees.
  7. Is there any easy way to map two indentical tree branches. So a reference can be set from one to the other page in the same hierachical place in the other branch. What would be the most straight approach looping them both. I thought simplest would be a simple find to get a flat page array of both then simply loop them both and map page to page. Or not? Is there a way to use key's in page array? Example of the branches to map: /de/ -page1 -page1.1 -page2 /en/ -page1 -page1.1 -page2
  8. it's as simple as checking for if the current looped $child is in parents of the current page: <?php if($page->parents->has($child) ....) // may look like this with a fully check if($page->parents->has($child) || $child === $page || $child === $page->parent) $status = " $class=' on'"; else $class = ''; Since $page->parents returns an array has "has" does check if it's in there.. you got what you look for. Just think about it for a second, it will be clear as water after you use it sometime. // not tested but should work I think <?php function treeMenu(Page $page = null, $depth = 1, $id = null) { $depth -= 1; if(is_null($page)) $page = wire('page'); if(!is_null($id)) $id = " id='$id'"; $out = "\n<ul$id>"; // This is where we get pages we want. You could just say template!=news-item or list the templates you do want foreach($page->children() as $child) { $class = "level-" . count($child->parents); $s = ''; if($child->numChildren && $depth > 0) { $s = str_replace("\n", "\n\t\t", treeMenu($child, $depth)); } if(wire("page")->parents->has($child) || wire("page") === $child || $child === wire("page")->parent){ $class .= " current"; } else { $class = ''; } $class .= " page-{$child->id}"; $class = " class='$class'"; $out .= "\n\t<li$class>\n\t\t<a$class href='{$child->url}'>{$child->title}</a>$s\n\t</li>"; } $out .= "\n</ul>"; return $out; } //parameters: current page, menu depth, ul menu id $menu = treeMenu($page->rootParent, 4, "myMenu"); echo $menu; EDIT: modified code a little... there was something double. And to check for $page, I didn't first recognize it, but in this case to check for current page in the function scope it has to be wire("page")->parents ... I testet and it works now. Current page and its parent get the class "current".
  9. Glad you found a quick fix. So then it looks like the html5 ajax uploader isn't working for you. This is a pretty new feature, it hasn't been tested much, and I did run into some similar situation and it was a long weird debugging session going on between apeisa and me I can't even tell what was all done (since private sent messages gets deleted when not expicitely checked). I'm sure there's still possibly something causing issues with something in combination of your servers software config.
  10. I think I remember now, it was on a crap server where safe_mode was on, so this message would appear... but your's off. I feel you.
  11. I'm sure I got this error once but can't remember where and what it was. ( when testing with the new upload ajax module with apeisa) There was something like this: "No problem. Thanks anyway for the test session It can be very confusing at times. But then, what's about this php bug with php://input? it does work on php5.2.9..." There was a bug in php -5.2.11 (i think) with php://input, but not sure why it still was working then. --- Could it possibly be that the file rights are messed up on the server? Like php not same group as ftp user, and you uploaded files via ftp?
  12. While I appreciate people doing such writing. I'm kinda dissapointed by that little PW review, stating wrong facts. One should at least know/understand the CMS, before writing something about it and state false things.... Or at least let it proof read by someone know the system well enough, if not sure about it.
  13. I'm trying to help Nico a little on this. And I think we reached a major problem concerning how this should work. I was chatting with Nico last night and he showed me his current module. It's was mainly reading the assets files dir to glob all files and in relation to the folder id delete them with manual sql from the field table. This show's all files (including thumbs) of each file and it has some limitations. I thought it may possible to make this using API and scan all templates for FieldtypeFile fields and do a find over all pages using those templates. Then iterate through them and list all files depending what type it is output a preview or link to the file. It works fine so far but I got problems getting the delete of the file to work on the page it is located through API. Anyway that's not the main issue. Now major problem is how to expand this with filtering and per branch in the tree and get a pager working, since it's returning pages with various files attached... the pager can't possibly be on the pages found but should be on the files found instead. I don't see an easy way to get this all running and having filtering (per page or pages, filetype etc) or search function possibly. So my question is what features would be needed and how could it possibly be done. I reach a major wall here I can't decide what would be best way to go. Many traps here I think. Attached the current rough proof of concept module. It installs a "Files" page after "Pages", and it shows files (no thumbs) and a pager which doesn't work correctly. Also deleting doesn't work, but it's just to give an example. ManageFiles.module.zip
  14. I would like to know a little more about your plans. Not sure if you seen my edit on your other thread showcase you site. I copied it to here: --- For your problem in managing images. Reading again you post, you want to have images in one place and select them on different pages? Or what are you needs here exactly? There's a simple way to archive something like this: Have an external section "files" where you upload images. But each image a separate page. Have a template "image" and add a single image field and may even more fields imaginable. So you could add a Page reference field "selected_image" that is set up to select from the section and only the "image" template. Add this field to your pages templates. Now you can select images/image using this field. You can manage images in one location and select it on each page. If you upload and replace an image the reference will not get lost, so this is a great solution. In the php template you would output the image using: <?php // if single page reference echo $page->selected_image->image->url; // if multiple page reference select foreach($page->selected_image as $img){ echo $img->image->url; } You even can select in TinyMCEs image PW dialog (select page, and chose image from that page), but this will add a path to the file and not an id reference, (which is my biggest problem with that approach). Though as long as you use it for out of TinyMCE content on page it's a great solution to have more control. It's also possible with a little hack (untill Ryan implemented this) to show a thumbnail in the page list select, if the label of the template is an image field (in template advanced setting available). Look this thread of mine: http://processwire.com/talk/index.php/topic,411.0.html
  15. WOw great module already, very well done. It's quite long code to study, but I just went and am playing around for a little. I see there's still some way to go But still that's what's there is great! Love it. I experienced some weird things. The template created home_language has fields set from the default basic page template. I think it should not add (only title) to or may try implement something to select it when installing -- So far so well, now the template fields are not using asmSelect it seems, so I cant add or change them. Dooh!! -- So also it shows me in the template overview page int he fields col "6 home" which is strange and shouldn't be, only count of fields. -- And when I add a physical php template to it, I get an memory excaused php error from adminbar module when viewing page. Errm not sure why, haven't looked further at it for now. I strongly suggest now that you're throwing out a first cut version, to upload a git repository of this. This would help and other may can help easier. Also it's great for issues. I fear it can get cumbersome to manage all in this thread alone. Thanks again for working on this awesome thing!
  16. Soma

    Sgym.de

    Nice work on the site Nico! Sure must been fun and simple to build it. Hearing your concerns about files in PW, I was about to write something about regarding file management in PW. I got the same concerns as you and while working on a pretty large multilanguage site too, I came across some limitations when dealing with images in various ways. I'm thinking about this part for a long time now and can get my mind around what would be best and how to accomplish it so it suits PW philosophy. I think we should start an thread on another board regarding this. Do you mind starting it? Make suggestions and think about alternatives. It was discussed and requested already by some people. If you would give a try at it, I would love to help. I think the way it's currently done works and is great and simple for certain cases, but also is limited and not very easy to maintain. --- moved edited message to here: http://processwire.com/talk/index.php/topic,692.msg5216.html#msg5216
  17. Great work on this module so far. I implemented the function like ryan suggested and it works great. I used this jQ plugin also in some project and it's a nice one. I agree with the feedback Ryan gave already. But since it's a WIP it's hard to give suggestions to current version since I don't know what's planned. Also since there's already many posts and I don't have the time to read and valuate all, aswell there's so many things and ways, options that it could need/have. I think it's a nice image extension for galleries, as I think using it for regular content (wysiwyg) images it's not suited. Just thinking loud, it need more love in the UI and having previews of the croped versions would be nice. But I think you already know that. Remembering the thumbs would be nice as if you edit/change an already edited it would be nice to start with the area already selected. Also autocrop was something that poped up in my mind imediately after trying. Would be nice feature like default croped image. Issues: Not sure if you are aware that when I upload (drag) it doesn't get shown, it stops for me by 100%. When I upload with dialog it works, but it doesn't invoke fancybox preview and crop fancybox function... so only after reloading page they work again. Some notice shown when debug on: Notice: Undefined offset: 1 in /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/site/modules/pwCrop/InputfieldCropImage/InputfieldCropImage.module on line 79 Notice: Undefined offset: 2 in /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/site/modules/pwCrop/InputfieldCropImage/InputfieldCropImage.module on line 79 Notice: Undefined offset: 1 in /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/site/modules/pwCrop/InputfieldCropImage/InputfieldCropImage.module on line 79 Notice: Undefined offset: 2 in /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/site/modules/pwCrop/InputfieldCropImage/InputfieldCropImage.module on line 79
  18. Thanks for your effort on this module. Unfortunately I'm too busy atm to check it out. Just from reading, I'm not sure if you are aware of the multilanguage admin feature Ryan is working on for 2.2 (~end year) here: http://processwire.com/talk/index.php/topic,598.0.html Not sure how this would take effect on your work here. May you want to make sure you could use some of what Ryan is implementing regarding new API stuff and such. Edit: just realized that this may not effect each other... not sure though if there could be some benefits. Question: One thing that just surprised me is why $Languages and not $languages, because it's like a constant?
  19. This is easy. In the TinyMCE field input settings, you must add "tablecontrols" to your buttons and add "table" to the plugin field. More advanced: It would also be possible to copy InputfieldTinyMCE to your site modules folder and rename it to create a new Inputfield. From there you can modify everything to your needs without touching the core.
  20. Hello ljones You don't need to echo everything, especially if its plain html. Also you may use the code tag: <?php ... for posting code in the forum. <?php is for highligthing php code properly . Since I'm so mad and am cleaning my own code currently, I was so crazy to clean up your code and made it as short as possible: <table width='100%'> <tr> <td class='room_no'>Room No.</td> <td class='cont_info'>Contact Info</td> </tr> <tr> <td> </td> <td> </td> </tr> <?php foreach($page->children as $child): ?> <tr> <td class='room_no'><?php echo $child->title?></td> <td class='cont_info'> <?php echo $child->ten_pri_name ? "\n<strong>{$child->ten_pri_name}</strong><br />" : '' ; echo $child->ten_first_name ? "\n<strong>{$child->ten_first_name}" : ''; echo $child->ten_last_name ? "\n{$child->ten_last_name}<br /></strong>" : '' ; echo $child->ten_website ? "\n<a href='{$child->ten_website}'>view website</a><br />" : ' n/a '; echo $child->ten_email ? "\n<a href='mailto:{$child->ten_email}'>email {$child->ten_first_name}</a><br />" : '' ; echo $child->ten_phone_no ? "\n{$child->ten_phone_no}<br /> " : '' ; echo $child->Media_Business ? "\n{$child->Media_Business}" : '' ; ?> </td> </tr> <?php endforeach; ?> <tr> <td> </td> <td> </td> </tr> </table> Or this is also possible to seperate html and php even more. <?php foreach($page->children as $p): ?> <tr> <td class='room_no'><?php echo $p->title ?></td> <td class='cont_info'> <?php $name = $p->ten_pri_name ? $p->ten_pri_name : '' ; $firstname = $p->ten_first_name ? $p->ten_first_name : '' ; $lastname = $p->ten_last_name ? $p->ten_last_name : '' ; $website = $p->website ? $p->website : 'n/a' ; $email = $p->ten_email ? $p->ten_email : '' ; $phone = $p->phone_no ? $p->phone_no : '-'; $mb = $p->Media_Business ? $p->Media_Business : ''; ?> <strong><?php echo $name ?></strong> <br /> <strong><?php echo $firstname ?> <?php echo $lastname ?></strong> <br /> <a href='<?php echo $website ?>'>view website</a> <br /> <a href='mailto:<?php echo $email ?>'>email <?php echo $firstname ?></a> <br /> <?php echo $phone ?> <br /> <?php echo $mb ?> </td> </tr> <?php endforeach; ?>
  21. Congratulations on 5000 Posts!!! 170 Users!
  22. Not sure. I thought it also gets when using sanitizer pageName. I think it should.
  23. There's also setting that can be made in the InputfieldPageName module for converting chars, like ä to ae.
  24. Yeah, don't know how can I missed it. I almost forgot about symlinks and that it's possible... I just created core pw folder on server for the 2 projects running on it. Works as expected.
×
×
  • Create New...