Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. That's some good sound in my ears. Can't wait to see something like this in PW This will for sure simplify module management. But I still don't really understand git well enough to be a help with it decide what would be best. I just know how to simply manage a repository... @ryna Also nice to hear symlinks can be used to have one rep of modules for multiple PW's on the same server. Are you linking the whole module folder? Would this be possible with templates aswell I guess or the core?
  2. Thanks Ryan for the Tip. It's an After Hook. I will later test this again with your suggestions.
  3. Ah sure now I get it Ryan (didn't see the there was a label) ... though this doesn't seem to work in IE8. I got it working in IE8 with the following changes. I did a condition for < IE9 and do a click event on the icon, that would then toggle the input checkbox. The routine to toggle field I moved to a function which get called by both versions. I tested in IE8 and IE9 and it works. New InputfieldFile.js attached. You may want to change your PW source with this or make further testing? InputfieldFile.js.zip
  4. Back to topic. I looked at the InputfieldFile.js where the delete ui handling is. I don't know how this even works in other browsers. It's delegate checking for the input checkbox to change, and sets the inputfield status according if the input is checked or not. The input itself is display:hidden! So, I can't click an element that's not visible... If I make the input display:block, the checkbox input is visible and I'm able to click in IE. I'm currently trying to get a workaround, but it's not as easy as I first thought. I'll have to consider it a little more...
  5. Thanks for testing apeisa. Then it must be something with my EditHelper Field Link module I guess, where I had to set a clearfix to the inputfields containers... will test again with deinstalled. EDIT: Yeah it was it.... My module does modification to the fieldwrapper to be able to put an inline element... But since it's only used for superadmin... no real problem for now. As for the top save button, I just left out the button duplication in IE, as mentioned in the other thread.
  6. Thanks for the offer to help adamkiss! Would be greatly appreciated to get it work in IE8. Client is in a network and can't install other browsers. As for IE8: - It's impossible for now to use PW in IE8 at all. The edit page layout is messed up totally!.. (tested this in IE9 switched to IE8, and tested in IE8 native on browserstack.com ...) - and the mentioned problems with delete file and topsave button.
  7. I agree with what being said. There should be more shortcuts and easier access to things. I already started doing something for when on page edit screen. http://processwire.com/talk/index.php/topic,470.0.html Dropdown menu for PW I implemented in my Teflon Admin Theme, to shorten ways. http://processwire.com/talk/index.php/topic,530.0.html
  8. You're welcome, glad if I can help. Thanks for the applaud 8) Not sure what exactly you want to archive... on template settings tab? I remember a related subject in this thread first page... http://processwire.com/talk/index.php/topic,414.0.html
  9. I fixed some issue with the module not working on TinyMCE fields when editiing a page on deeper than 3th level. For some reason the FormSaveReminder.js which does the checks, was then getting applied after all the tinyMCE scripts and thus not working. (on higher levels it was appended before them) It took me many hours to realize this was the problem What's up with this Ryan? I did now change it to get inserted through str_replace just after JqueryCore script. I'm not sure how future proof this will be, but I guess the JqueryCore will never change. Latest version is now on github. Thanks EDIT: Just found that in Firefox it doesn't work with TinyMCE Fields at all... Firefox is almost like IE now, crap...
  10. Hi and welcome to PW forum! since it's a field on the page, you get the selected page reference using something like this <?php /* make sure the inputfield i.e: "userpage" setting is set to allow only 1 page */ // get selected userpage url echo $page->userpage->url; /* if inputfield page is set to allow multiple selected */ // to get first echo $page->userpage->first()->url; // to get all foreach($page->userpage as $userpage){ echo $userpage->url; } Written in the browser, so could contain errors.
  11. You can get user created and modified for a page with <?php $page->createdUser->name; $page->modifiedUser->name; $page would be $child in your code
  12. It could be done easily in the core, but most flexible I found is to copy tinyMCE Inputfield to site folder and rename it. Since bramus_cssextras can be used to parse content.css automatically it makes sense to have it outside core anyway. I'm using it like this now in my projects. I came to the conclusion, if we gonna make this in core you would have to extend everytime again when in need of a new plugin/feature.
  13. Thanks antti for testing. Yeah IE9 seems to work, it's IE8 that causes problems. Since there's no support in PW for < IE8 it should in fact be < IE9, or honestly I would be all in to drop IE completely even. But there's client's not able to install other browsers in a company environement as we all know. I'm sure there's a simple solution to this in IE8 to get delete function working, but then I think there's a lot more we didn't find yet. I think this all should be addressed as soon as possible on how PW will continue regarding browsers support. It was a bit unlucky that I wasn't aware of this before, and found only out after the client already failed and lost content he entered already.
  14. There's seems to be another problem with IE, (or at least IE8). Deleting images using the trash icon doesn't work in IE. I don't have an IE currently available to test this. But client changed to Safari and it's working, so definately a problem with IE. Anyone having IE can confirm this? Since there seems to be popping out various problems with IE, how far is this really tested? Considering most client use IE, it seems PW is not really usable with IE.
  15. Have you been able to look at this again? My experience is somehow outdated of these both, haven't used FCK fo a long time. I'm asking also because clients tend to be on IE 80% of the time (it's a shame) and definately would be great to may have an alternative if TinyMCE is that buggy on IE.
  16. Thanks Ryan. It's in all IE and not sure whats causing, definately not cache... http://www.peterbe.com/plog/button-tag-in-IE I think its beacuse its twice, or a button and not an input... If you read this Link... Its first post is from 2005, last from 2011. And yet MS has done nothing to fix it. :/ EDIT: Strange thing is when saving with top button, it reloads page and says "Session: Changed Title" ... but it's not saved. I think easiest would be to just leave out top button on IE, until we fixed it. It's not very nice, since it will lose content entered... EDIT: I've temporarely put a if(!$.browser.msie){ ... } in the templates-admin main.js around the top button duplication on line 21. So nothing can happen, and IE won't have that button on top.
  17. Just had a message from a client. They found teh top save button doesn't work. I tested in IE since they use IE. And it does not save content, although the page reloads normal like when saving.. but no change/save message. It works when using bottom save button.
  18. I'm not sure about your code, it wouldn't work for me... Right approach would be $news = $pages->get('/news/')->find('sort=-created, limit=6'); or $news = $pages->get('/news/')->children('sort=-created, limit=6');
  19. That would be great if you try to implement this. I'm happy if it could help out with this issue.
  20. After desperately searching for what the problem is, I resign as I don't know the core system that well let alone understand it all yet. But found that it works well if you don't try to do any of these -> wire("pages")->get()... wire("templates")->get(...); after template and pages are created saved, and just use the objects you create. So removing the last listPages, the script works. So the listPages at the end also does not work cause it iterates through wire pages array, and somehow it doesn't work cause there is no template-/page id found. But I'm sure Ryan will find the problem and may able to solve it.
  21. Already tried uncacheAll, but doesn't help. wire("templates")->get("mytemplate"); returns NULL after template is saved. Parent page gets created. But... wire("pages")->get("/holding-page/"); returns WireDB mysql error after parent page is saved. So the page and template is saved and there, but not really somehow to continue creating sub pages. 1136 is the parent page id.
  22. here the code: <?php include('index.php'); print '<body style="font-family: Verdana; font-size:12px">'; function listPage($page, $level = 0) { echo str_repeat(" ", $level) . $page->title . "\n"; foreach ($page->children as $child) listPage($child, $level + 1); } function listPages() { print "<pre>"; listPage(wire('pages')->get("/")); // start at homepage print "</pre>"; } listPages(); $tmpl = wire('templates')->get('mytemplate'); if (is_null($tmpl)) { $fieldgroup = new Fieldgroup(); $fieldgroup->name = "mytemplate"; $fieldgroup->add("title"); // add some fields $fieldgroup->add("body"); $fieldgroup->save(); $tmpl = new Template(); $tmpl->name = 'mytemplate'; $tmpl->fieldgroup = $fieldgroup; $tmpl->save(); print "template created: " . $tmpl . "\n"; } $parent = wire('pages')->get('/holding-page'); if ($parent instanceof NullPage) { // Create a new Parent page $parent = new Page(); $parent->template = $tmpl; $parent->name = 'holding-page'; $parent->title = 'Holding Page'; $parent->body = 'This is a parent holding page'; $parent->parent = wire('pages')->get('/'); $parent->save(); print "Created 'Holding Page'<br>"; // If the following line is enabled then execution fails here // Reloading the page that has just been created therefore doesn't work //$parent = wire('pages')->get("name=holding-page"); } $data = array( array('testpage', 'This is test page'), array('testpage', 'This is test page (duplicate of first one)'), array('testpagea', 'This is test page A'), array('testpageb', 'This is test page B'), ); foreach ($data as $d) { $page = new Page(); $page->template = $tmpl; $page->parent = $parent; $page->name = $d[0]; $page->title = $d[0]; $page->body = $d[1]; try { print "Saving {$page->name}<br>"; $page->save(); } catch (Exception $e) { $n = 0; $pageName = $page->name; do { $testName = $pageName . "-" . (++$n); print "Checking for {$testName}<br>"; $test = $parent->child("name=$testName, include=all"); } while ($test->id); $page->name = $testName; $page->save(); print "Successful: {$testName}<br>"; } print "(parent now has {$parent->numChildren} children)<br><br>"; $page = null; } listPages(); print "</body>"; I was kinda wrong before. The "holding-page" creation is done, but it's not callable with using wire('pages'), thus subpage creation fails. I will test Ryan suggestion...
  23. Problem is it fails creating the parent page because the template newly created isn't accessible through wire (so error is shown "Invalid value..." first time running the script). So page creation fails. After that, the template is already there, and thus works.
×
×
  • Create New...