Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Look cumbersome to me cause $cityid is not the id but the page object. So $cityid->title would be enough. No reason to get the page again. If you echo $cityid you will get the ID because of the __toString() method but in fact it's really a page.
  2. This thread title is wrong. TinyMCE IS a module like almost anything in PW. *Hides behind stone*
  3. children() can also have a selector. In fact it's using a find behind the scenes.
  4. I'll say it once again... that's what my form save reminder is for so this doesn't happen when leaving the not saved form. I still think it should be core standard. Ryan seems against it because he is in fear of the wysiwyg that needs special treatment. I see that but would rather accept the challenge cause it is very well possible and all special inputfield just have to make sure they do a form change trigger if needed. There's not really any that currently doesn't work. I think a great software just has to do this otherwise it loses a big point in usability. But maybe thats just me.
  5. Since you have custom sorting, no there's no index. $page->sort would be the sort index from the tree but that would be different once you sort on a custom field possible with ASC or DESC. I'm not sure I understand the logic/context of your "if on Gamma, return 1 for Alpha". Also I'm not sure why you have "include=all" in your query. Just will return all pages including those that user would have no access, unpublished pages etc.. Your script would be one way to do numbering, but $i isn't defined and you would get a notification. $a = $page->siblings('include=all'); $i = 0; foreach($a as $b) { $i++; if ($b == $page) { echo $i; } } So this would give you, if on Gamma page "1" If on Alpha page: "1" Is that what you want? Another way to number pages is using a $key in foreach (zero based): foreach ($page_array as $key => $p) { echo ($key + 1); }
  6. Maybe you can also let us know what PW version, and where this script is run: Template, Module, Bootstrap ... This works as expected for me. Though possible there was some fix. I could image the problem has to do with pages in cache/memory vs pages queried from DB. Once you create a new page and add children to it, the $mypage page is already in memory and $mypage->children() may not return any children cause there was none when you created the page. Though it works for me so looks like children() makes a DB query after all. BTW you don't need $page->of(false), because a newly created page via API has no output formatting yet.
  7. I just was thinking if you possibly create new templates, roles and permission for every new user which may wouldn't scale well.
  8. Why do you want to create and set all this things by API? Can't you just use admin UI?
  9. Craig already sowed how. Or what else you mean?
  10. I don't think that would be easy possible as Ryan explained. Repeaters are limited to what you can do. I would think you're better off using child pages under event to do what you want. It would be more correct from a data structure point and open up more selector friendly handling.
  11. It's in the main.js of the theme. There was some fix in ~2.3 for that.
  12. The cms we also use at work has a draft - live system. Save does save the page but its not published and just keeps it until you hit publish. Until published it is marked I a different color. Simple. Not sure how this would be possible with pw.
  13. Why Not simply use the great Fredi module for front end editing? Or use edit links that point to the edit page in pw and append &modal=1 and use some lightbox iframe script. Much less hassle and dead simple.
  14. Soma

    I'm back

    And I thought I left the hard ones to you.
  15. Just fixed a bug with status getting cleaned. So a unpublished page would get published. It just ignores the status now, which isn't something you want to autosave anyway. (There would have to be some special treatment as ProcessPageEdit does)
  16. Your images are only a paths? And where are the pixels?
  17. BTW why is there no autosave in this forum... I lost some long written posts several times during the years.
  18. I pushed an update with default AutoSave only enabled on unpublished pages. Added option to enable it for all pages. That might be true for simple text page with no files. Files and images is what makes it not so simple. And to go further there could be all kind of weird situations wehre you have references to pages that doesn't exists anymore. And so on. It's not like in a nice closed predictable environment like in a audio composing tool (I also use) or a design tool. On the other parts I'm not commenting.
  19. Soma

    I'm back

    Thanks Ryan for your precious time! I'm in awe how you still respond to most posts... I'm sure you missed some, but I'm also loosing control
  20. Yeah that's what I also thought having it only for unpublished pages or also just certain templates. But first wanted to know if it's possible at all to autosave and how. There maybe also a way to save the edits not to the page but to a file and load it on demand after a loss. Im not too keen creating new pages for it. Also I think certain fields like files will not work this way. Speaking of drafts and live version that's something still missing in pw and I would have that on top priority. But Im not in charge of it and it's on the roadmap, though got delayed by a lot. I'm waiting for it since the beginning of using pw two half years ago. ;p Though Im really wondering if with the flexibility pw offers how to use pages and combinations of fields and hooks if a draft system really works out well... if you know what I mean... seeing also things like 'simple' clone feature is not working in all cases. No offend intended, I know Ryan is doing all he can and doing a hell of a job, but he's still "alone" on those stuff.
  21. I know Pete. Exactly, but I didn't ask for it and will not use it cause I can hit save.
  22. Ho Joss, happy new year! Ok that was more helpful than just "it's not saving". Ah, of course ckeditors inline mode need some special treatment. Took me a while to figure it out but it's working now too. Thanks.
  23. Just pushed an update to github with some fix. There were some routines for TinyMCE and CKEDITOR to update the changes to the form before sending, which required some additional check for if there's really editor instances. So this most likely was your problem. Added some additional checking for form validation. So it will show errors of the saved form and show them too. Thanks for testing.
  24. I think I know what's going on. I'm just updating with some fixes and also with additional feature to check for form errors and show them.
×
×
  • Create New...