-
Posts
6,808 -
Joined
-
Last visited
-
Days Won
159
Everything posted by Soma
-
Sorry for the double post. Ryan, I'm using this for simple form. I noticed there's a setting "emailSubject" but on the mail send, you don't enter $this->emailSubject its a hard coded "Web Contact" ... Also I had to modifiy it a little here and there to make it work for my case (multilang). I also added a property to be abel to add a string before the message body. I know this is still very rough version, but just to mention.
-
Thanks for the kind words. Yeah, flash bye bye! The content is in html form that is exported from indesign files. We work together with a multimedia company doing the html export. So tables are html tables "clean" and with predefined stylings that reflect the print design. I then export the htm files they give us into PW and use CSS to style. From there I generate xls on the fly using phpexcel and simple html dom. So this is a one time export-import scenario, the data doesn't come from somewhere dynamically. This is dictated kinda by the workflow they got. It's all a bit complicated going from excel to indesign for print, then from indesign to html... This will all get prepared shortly before the print version goes final, so the last import will be always done 1-2 days before release of the print, because they change thing until last moment. Somehow I feel there's much work involved preparing things on various ends, but there's no other solution to this, like xml or xls zentralised data that could be used by different medias.
-
Thank you Apeisa for the infos. I have another thing we might should look at. There seems to be problems with floats not cleared in the PW admin (default), like I do normally use clearfix class. I've experienced this while creating themes. For example also you redirects module, the buttons overlap the container (form) on bottom. I think there should be some solution to make this working better and consistent. I had to implement a clearfix over script to some containers so I can add inline/floated stuff. I sense that there we will have problem when there's modules and custom theme's that do thing differently. What is everones experience about this?
-
It works for me... <?php $page->created = time(); $page->save(); // outputs current timestamp echo $page->created; --- ops but after removing it outputs the old again, so it's not saved.
-
Thanks for the update! I just trying it out and its awesome! Also the strange messing up is gone now. Also like how you solved it with the thumb links and the preview is awesome! I think it's an ok solution to make a popup, and it's well done I think, just the order and preview I still don't like it with big images. What if there would be no preview just the big image and the "crop" button on top left or so? After cropping we already have a preview, and it already can be edited again. I think it's hard to see there's a button on bottom hidden, just thinking. --- Somehow the crop button is at a strange place for me, is that only my theme? (see screen)
-
Yes that's the language country code. de-ch is german-switzerland
-
Since a few feek I've been working on the relaunch of zueblin.ch and its reports on reports.zueblin.ch. It's gone live today so it could be DNS isn't switched everywere. Design and concept is made by a print designer, I did all the programing and some design elements. It's pretty big project with 3 domain (.fr and .de) in 2 languages all in 1 PW install, and it was done quite fast in a short amount time. It has already about 1100 pages and ~500 pdf's as pages. Special is the fully ajax loading of all pages which degrades to a still working site without javascript. Many thanks for all the support and help with modules, it was fun to do it and it will continue. I just hoped the multilang module by Oliver were already done, so I could've used it here. But still it all works very well with language trees. http://zueblin.ch http://reports.zueblin.ch --- reports is the "broschure" of their annual reports. All content pages I import into PW from an export (html) a company is doing out of indesign documents. Many tables and data. I've done xls creation on the fly from the table markup, and the zoom function for large tables happens automatically (all js). It was a blast doing that all in PW. So powerful and simple with import and building a stuctur that is felxible and extensible.
-
when I enter some urls like "/de/finanz/finanzberichte.aspx" and when I click on it to edit, it says: Error found in field 'redirect_from' - please check that it is a valid URL It is valid and for some reason this doesn't show error (huh?): "/de/corporate_governance/corporate_governance.aspx" Some work some don't. But on frontend they all don't seem to redirect ... ? --- ok sorted it out , it'w working on the frontend now, I had urlsegments enabled on the root template for the "/" . So it didn't work, can you reproduce this? The error is still shown on admin for some links. But can't see whats wrong. May todo with the .aspx bein evil?
-
NullPage::hasRole says to me there's no "userpage" found so its returning NullPage, and there's no method on NullPage.
-
Shouldn't it be hasRole("string"); ? You load the role as object and not as string, and hasRole expects the name (string).
-
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.
-
Wohoooh! What have you done? Another eastern egg? Can't wait to try out later if I'm not fallen as sleep...
-
apeisa, I got a process module "Image editor" that leads me to this thread seems like that is from your crop images module?
-
There's a filter option on top of Templates... check show system templates . You will see a "user" template.
-
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.
-
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.
-
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
-
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".
-
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.
-
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?
-
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.
-
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
-
Sure I added you on both
-
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