Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. Great work Steve - this is one of my pet peeves too - I can never understand people's laziness when it comes to typing their name correctly. I have a couple of different stores that would definitely benefit from this!
  2. There is actually some pretty good documentation in the first post of the VIP support board for the Table field, so once you have purchased and have access, all the info you need is available, although I agree it should probably be available here: http://processwire.com/api/modules/profields/table/ so the people considering purchasing it can get a better idea of how the API side of things works.
  3. I am actually not sure on what it will and won't accept, but I know it accepts template and name - presumably it accepts most/all other selectors as well. Maybe someone else will know for sure.
  4. It's missing a semi-colon at the end of the if($pic .... line.
  5. One thing that would be very helpful is if you can provide the exported JSON (or full zip package if that is relevant) that is causing issues when you import - this will make it much easier to debug. Thanks again!
  6. Hi @jlahijani, I haven't done much on it for a while now. I did think that most bugs were sorted by now though. The biggest remaining issue (I thought) was page fields and how to handle them if their content pages are in a page tree that is not part of the exported parent. At the moment they are exported and recreated on the destination site as a child of home, which obviously may not be ideal, so I think I need to add some additional logic to recreate the entire tree above the page field parent (if it doesn't exist on the destination site), although I can see this being problematic too. Since you've been testing lots, I'd love any thoughts you might have on the best way to handle this. Also, please send through all the details of the errors you got while testing - it will be a huge help I am sure. As for Wordpress vs Processwire - are you wanting to feature Migrator's use as an importer of WP content (using Nico's plugin), or just its ability for migration of PW content from one site to another? If the former, then I think that functionality should be pretty robust. Anyway, please let me know what you have uncovered - it would be great to get this to the next level!
  7. This suggests to me that everything is set up ok from the apache side of things. Have you tried a fresh install of PW on this server to see if that goes ok? Maybe it will report what the problem is?
  8. Have you gone through the list on Nico's troubleshooting page? http://processwire.com/docs/tutorials/troubleshooting-guide/
  9. This is put together very quickly, but should work ok. If the user is logged in, but they don't have page-edit permission, and they try to load any page with the admin template, they will be redirected to the site's homepage. Of course you can tweak these as needed. <?php class HideBackend extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Hide Backend', 'summary' => 'Redirect guest user from backend admin back to site\'s homepage.', 'href' => '', 'version' => 1, 'permanent' => false, 'autoload' => 'template=admin', 'singular' => true, ); } public function init() { if($this->user->isLoggedin() && !$this->user->hasPermission("page-edit")) { $this->addHookAfter('Page::render', $this, 'redirect'); } } public function redirect(HookEvent $event) { if($this->page->template == "admin") { $this->session->redirect("/"); } } }
  10. Sorry you are having such a rough time of it - it can seem like voodoo sometimes Have you tried a simple index.html file in the root of a virtual host DocumentRoot directory? Does that work? Is it just a PW install that is giving you the 500 error? I could be completely off, but is it possible it's the period in your site2.dev folder name? PW has this restriction, although it is for dirs "beginning" with a period, so probably not. # ----------------------------------------------------------------------------------------------- # Access Restrictions: Keep web users out of dirs that begin with a period # ----------------------------------------------------------------------------------------------- RewriteRule "(^|/)\." - [F]
  11. Need to password protect your site? http://mods.pw/7o | Want to make sure page names match titles? http://mods.pw/7n

  12. I actually can't see why your original code isn't working. I often use that approach: https://processwire.com/talk/topic/7700-find-image-by-image-name/
  13. I am not sure I understand completely. Are you actually wanting PW to store the password as plain text, or just return the password as plain text before hashing and saving?
  14. http://stackoverflow.com/questions/3579072/php-fileinfo-is-undefined-function
  15. Well I was actually creating a module as you spoke, but not for this Sounds like a cool idea, but I really have to focus hard on some real work for a while, so it might not be me that takes this on I'm afraid, as much as I'd love to
  16. Well all those lines are doing is getting the page object based on the id that is being sent via the URL, then turning output formatting off (standard procedure before saving a page), setting a field called "checked" to "1" which is the checked status for a checkbox, and then saving that field on the page. I don't expect this code will be an exact solution for you, because I don't know exactly how you have things set up. It was just designed to give you some ideas. If you provide more details, I am sure we can give you more complete - that is if you can't work it out yourself first - it's always good to try first
  17. I have had some similar issue and hacked around them also. Never really tried to figure out the root cause or come up with something that was repeatable enough to report.
  18. Might be unlikely, but what if a bot decided to hit 1000's of random pages on your site looking maybe for admin access or something - then your redirects database table would be full of all these entries - could get messy!
  19. It's just that the ability to assign icons to modules is a relatively new feature and those modules haven't been updated to add the icon yet. You should perhaps file separate requests on the github pages for each module. That said - are you really giving the client access to the Setup menu?
  20. I have reopened the issue on Github for Ryan to take another look.
  21. I agree - it might be worth you filing an issue on Github about this and see what Ryan can come up with.
  22. This shouldn't be difficult to do. You just need to add the checkbox to your template so that each story has a checkbox or "Complete" button or such. Use some jquery: $('#checked').click(function(){ $.ajax( '/change_complete_status.php?pageid=<?php echo $page->id; ?>'); }); Although maybe you need to inject an article id, rather than the entire page id - not sure how you have things set up. Then in change_complete_status.php <?php include("./index.php"); //bootstrap PW $page_id = (int) wire('input')->get->pageid; $p = wire('pages')->get($page_id); $p->of(false); $p->checked = 1; $p->save("checked"); Or something along those lines.
  23. Just wanted to mention here that I just made some changes to the config settings that I think give more flexibility, and are hopefully also more logical. I have updated the first post to detail the new options. If you are running the old version and update to this one, please be sure to revisit the config settings.
  24. I think this functionality is now in the core: https://github.com/ryancramerdesign/ProcessWire/commit/3085046112b79ea5eb3fd90ad2476f144fd3d7f4 "Plus, add the ability for PageTable to detect and pick up children that were added via some others means."
×
×
  • Create New...