Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. Ok, just tested and works great. Images show up
  2. Yes I tried the ed.isDirty, and it must be returning true, although nothing has changed... there must be something happening maybe onunload when pressing "save" on page. Because save button is excluded from the check and when hitting removes the onbeforeunload from the window. So my guess is that tinymce does something in between or right after that... strange Edit: If I remove the tinymce check, it works as desired. Another guess is, which you suggested, that it may change the hidden textarea before unloading... thus invoking the other form field check aka textarea... need to test a little more.
  3. yes my output is: /Applications/XAMPP/htdocs/pw2.ch/myfolder/strap.php /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/myfolder/strap.php realpath is: /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/myfolder/strap.php /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/myfolder/strap.php already seen (i'm fast )
  4. Ok I got it on local server. Normal install, latest version (with latest inde.php) I create a strap.php in myfolder like: http://pw2.ch/myfolder/strap.php Code in strap.php: <?php include('../index.php'); $p = $wire->pages->get("/about/")->children->first(); foreach($p->images as $img){ echo "<img src='{$img->url}'/>"; } ?> Output code is: <img src='/myfolder/site/assets/files/1002/p1000832.jpg'/><img src='/myfolder/site/assets/files/1002/p1000840.jpg'/><img src='/myfolder/site/assets/files/1002/p1000835.jpg'/><img src='/myfolder/site/assets/files/1002/p1000176.jpg'/><img src='/myfolder/site/assets/files/1002/p1000183.jpg'/><img src='/myfolder/site/assets/files/1002/p1000184.jpg'/><img src='/myfolder/site/assets/files/1002/p1000185.jpg'/><img src='/myfolder/site/assets/files/1002/p1000186.jpg'/><img I sent you the phpinfo in a PM. Thanks
  5. Hey Ryan. Thanks for the infos. I didn't recognize first but this tinymce onchange_callback isn't working the way we need when hitting "save" button. It shows the confirm dialog although nothing has changed. Same problem as I got before with using onchange. Somehow tinymce changes something when hitting save button, before leaving page. That's why I used "onKeyUp" and "onExecCommand". So I tried to find a solution, but I found only execcommand_callback which only works for when any command was used. So entering text doesn't work. There's no onkeyup_callback or something. Any help appreciated. Thanks. // tinyMCE check if content has changed var TinyMCE_change = function(ed) { addCheck(); }; // modify PW's JS config data for each TinyMCE instance $(".InputfieldTinyMCE textarea").each(function() { config[this.id].execcommand_callback = TinyMCE_change; });
  6. Ok I did a screen capture of what's going on.... notice once I scale page it works.
  7. Thanks Ryan for this fix, I grabed it and still not working for me. Bootstraping from a subdirectory outside of PW dirs, it includes the subdirectory in the image url.
  8. Thanks a lot Ryan for your time getting closer into this. Exactly something like this I was looking for to overwrite tinymce onchange event afterwards... Thanks for the example, works great! Didn't know what isDirty was... Now the tinyMCE.js isn't needed anymore. You're right that it creates a overhead using "input" and live. I was playing around and thought live would be nice if there would be something attached later to the dom... may not. BUT I changed swoped "live" with "one", now it gets only executed first time. And I also implemented your suggestion on the selector having a form > ul.Inputfield context. (BTW didn't work before getting the actual checkin from github. Did the missing closing ul on checkboxes may cause it not working. Well now it does! ) Thanks for the detailed insight on why the hook doesn't work for other edit pages. I got it working now and attached the Check to all edit pages, Page,Templates,Fields,Users,Permissions,Roles,Modules ... I attached the latest version. Just minor, but I'm not good in giving good names. Do you think PageEditCheckState ist ok? Ans it's description? Thanks again for your help!
  9. Don't know why it is so. But Ryan certainly could tell you what's up with this. You could alternatively put the file in the root, this would work. Or if you got it in a folder in the root you could filter out the additional path segment. Simple as that: $path = str_replace('/myfolder','',$img->url);
  10. I assume in other cases it's working? DB setup is utf8_general_ci? Could it be the serialize form jquery function escaping 's? Have you tried without jquery validate ajax?
  11. I think it should also be trashed. That's just the most common. But thinking about it, what would be if: "I only want to remove this mapped page from this lang tree AND not on other language tree". It would require to delete all and recreate all the others... not good. So it should at least be possible to "flag" if this page is mapped or not. I think it should be forbidden to move synced page to unmapped ones as parent. If parent is unmapped, all childs must be. You mean a "$lang" var for use in templates, I think ISO-codes 2 digit be the way to go...
  12. Looks ok. But this alone doesn't help much, I still can't reproduce. Not sure if something like $wallmessage->setOutputFormatting(false) could help here?
  13. I can't reproduce this. It does work for me as expected. Do you have more details on your DB charset setup and more code of what else is there? What PW version?
  14. I tried something that should do what you want. Although it depends what you want to archive exactly, there are alternative ways/technics that would work in PW21. <?php $pagetags = explode(',',$page->tags); $tagstring = implode('|',$pagetags); $tagstring = substr($tagstring,0,strlen($tagstring)); echo $tagstring.'<br/>'; $related = $pages->find("template=page, tags~=$tagstring"); echo '<ul>'; foreach($related as $item){ if($item !== $page){ echo "<li><a href='{$item->url}'>{$item->title}</a> (RelatedPageTags: {$item->tags})</li>"; } } echo '</ul>'; You may need to further limit the $pages->find by using more selectors and a limit etc, depending on how many pages there are.
  15. Just attached the working latest version 2. See first post. - works for all inputfiledtypes - works for tinymce - works for sortable fields - should be crossbrowser save, although not really tested yet other than latest safari, chrome, firefox Tried to attach the same hook also to "template/edit?id=" and "field/edit?id=" pages, but js didn't get included. I can manage when using Page::render, the js gets attached as the first js, even before jquery core. So it wouldn't work, thats why I chosed Process::execute. Is that right, that I might should use str_replace version to add js on bottom of js list?
  16. Thanks Ryan for the help. I think this would be nice feature to have implemented by default somehow as installed module(?). Hehe apeisa, seems so... Just updated this module, and attached new version to first post. I recognized that I messed up something and wouldn't work as intended. Also updated check for sortable changes.
  17. It happens with all sizes, but the strange thing is that it sometimes worked and most of the time not. Just resizing page to very small it fixes it. Don't know if it has to do with the images size or the size of fancybox..
  18. Implemented the suggested changes. It's working good so far. Attached new version to first post.
  19. Form Save Reminder Module To prevent losing unsaved changes when editing a Page: This module checks for changes while editing a page, and throws a confirm dialog when leaving the page without saving. More Infos and download this module: http://modules.proce...-save-reminder/
  20. Thank you Ryan for taking the time to look at it, amazing suggestions with code examples, haven't really considered these things yet! That all makes sense. Thank you a bunch. But, it's actually my second module see here http://processwire.com/talk/index.php/topic,435.0.html ;D
  21. Thanks Ryan. Got a new version with the gear icon added to make it a little more sexy...
  22. You can drop files (multiple too, cool didn't know, but I'm not using safari anyway) onto the file select button. It doesn't upload immediately, have to press save. Why don't you install safari for windows and try?
  23. HelperFieldLinks Just got a new module working that is only visible to superusers, and is handy for when developing a site, or investigate someone elses. 1. It adds a shortcut link to all fields on page in the backend. The link name equals the field name, so on very large complex sites with lots of fields, it can help to quickly see what name the field has. 2. It also adds a shortcut to the used template (in the template select field under "Settings" tab). They appear on bottom right corner of the field. Any suggestions for a better module name and general feedback is welcome. ProcessWire Modules Directory: http://modules.proce...er-field-links/ Direct github download: https://github.com/s...elperFieldLinks
  24. Think I found the issue. It has somehow to do with the size of the dialog window and or not the size of the images. If I resize page to small in chrome it suddenly works again because dialog is opened much bigger relatively.... not sure if that makes sense but because im on 13" laptop 1280px... annoying bug you... go away!
  25. Yes I did, but no luck... got 13.0.782.220 Awesome, congrats apeisa! and ryan! Great work guys!
×
×
  • Create New...