Jump to content

adrian

PW-Moderators
  • Posts

    10,912
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. How do you know it's not loaded? Try adding this below the call to jQuery <script> if (window.jQuery) { alert('jQuery is loaded'); } else { alert('jQuery is not loaded'); } </script>
  2. Just a small update that adds some nice default styling to the login form. It populates the CSS field on install so you can still edit however you want, but gives a much nicer starting point If you have the module already installed, you'll want to update, then uninstall and reinstall to populate the CSS field. It now looks like this by default:
  3. Hey horst - I am not really up on the latest with this, but just to give you an idea, I can get a successful test with gmail with only: smtp.gmail.com 587 use START_TLS with no credentials entered at all. Not sure if this is unique to gmail. I agree though, I thought most SMTP servers required authentication these days. It seems that gmail doesn't actually send a message, but the test is still successful without. BTW, the settings that actually do send an email via gmail for me are: smtp.gmail.com 465 use SSL email and password as credentials NB: I actually need to turn off use START_TLS
  4. I had a similar situation the other day with a gmail smtp setup. The test connection worked fine, but the email didn't send. Turns out the test worked with a few different config setups, but the email only sent with one specific setup. So I think a successful test connection is not always a guarantee that everything is set up correctly. Not sure that your module can do anything about that though.
  5. I am not totally sure why you have the child Home page. If it's just to get it to appear in the front-end menu, then there are much better ways. $homepage = $pages->get("/"); $children = $homepage->children; $children->prepend($homepage); foreach($children as $child) { $class = $child === $page->rootParent ? " class='active'" : ''; echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>"; }
  6. I don't think you can change that setting in your template because it is already loaded. I think the best approach is to add the following to the top of the template file that is being appended. if($config->ajax) return; or instead you could use: if($useAppended) return; and then in your template files you could do: if($config->ajax) $useAppended = true; Lots of options really
  7. Check out the image version, also from blad: https://processwire.com/talk/topic/7379-module-alternativegridimages/
  8. I am still not 100% clear, but it sounds to me like maybe you don't want a new way of storing product/price info, but just a new way of entering it. It sounds like you still want the data stored in the product's page fields. Is that correct? If so, you might be looking at implementing something custom with AdminDataTable (core module often used by other modules), or HandsOnTable. Here are a couple of links for inspiration: http://modules.processwire.com/modules/data-table/ https://processwire.com/talk/topic/4147-excel-like-crud-in-pw-using-handsontable/ and of course the ProTable field type. I think with ideas from those you could build a process module that builds an editable table using the product/price info from the fields from product pages. When saving the table, the data would be written back to the appropriate pages. Am I on track at all?
  9. 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!
  10. 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.
  11. 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.
  12. It's missing a semi-colon at the end of the if($pic .... line.
  13. 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!
  14. 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!
  15. 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?
  16. Have you gone through the list on Nico's troubleshooting page? http://processwire.com/docs/tutorials/troubleshooting-guide/
  17. 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("/"); } } }
  18. 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]
  19. Need to password protect your site? http://mods.pw/7o | Want to make sure page names match titles? http://mods.pw/7n

  20. 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/
  21. 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?
  22. http://stackoverflow.com/questions/3579072/php-fileinfo-is-undefined-function
  23. 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
×
×
  • Create New...