Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. SiteProfiles can't be installed like this Read the install part here http://modules.processwire.com/modules/process-wire-bootstrap3/
  2. $province = $pages->get("name=provincename"); But usually you have the select option value the ID since name isn't unique.
  3. Something like this can be done Top root menu // default root is "/" echo $treeMenu->render(array("max_levels" => 1)); Submenu $root = $page->rootParent; // top root parent of current page echo $treeMenu->render(array("max_levels" => 1), null, $root);
  4. ProcessWIre urls are "/path/" not "/path"
  5. In other browsers drag and drop works on the input button to add files ( without ajax ), if that works in IE it's almost like the html5. Haven't tested on IE9. A polyfill? https://github.com/Jahdrien/FileReader caugh.. dependencies, I don't know...
  6. ufff, just thinking... would a onchange on the file input with triggering the save button help as workaround? Maybe bombined with a add hash to form action url to jump to image field? Kinda hacky but should work fine. $('#ProcessPageEdit #Inputfield_images').on("change", function(e){ $("#ProcessPageEdit").attr("action", $("#ProcessPageEdit").attr("action") + "#Inputfield_images"); $("#submit_save").trigger("click"); });
  7. You do a GET and then you catch POST?
  8. What if you have multiple image fields on page? Or a image field with only max 1 image? And also one field with slider and field without?
  9. I think it would be rather $products = $pages->find("template=product, (product_name=computer), (product_category=electronics)");
  10. Or groups are in dev since couple months and then 2.5. https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=64049
  11. I already know the problem/answer just by reading post titles like this one in this forum. This problem has come up and answered 1001 times at least. I even got in a heated discussion with a co-worker about this, where he just don't get outputformatting, even after explaining him multiple times again and again. He even insisted on that in his particular case it doesn't work even though it should have...
  12. Ok, no need to use SQL here. Also not sure why you're foreach($languages as $language)? You can uncache the user and load it again via API, so it will load it fresh with language stored on user page. try{ $u = $session->login($username, $pass); if($u && $u->id){ $pages->uncache($user); // make sure it doesn't get user from cache $langID = $users->get($u->id)->language->id; // now load the user page $profileUrl = $pages->get(1003)->localUrl($langID); $session->redirect($profileUrl); } else { $loginError = "Login failed"; } } catch(Exception $e){ $loginError = $e->getMessage(); } I posted it in various login threads already, because all example login code posted in the forums has some flaws in that it doesn't catch errors when login failed multiple times (login throttle). To catch that you need to use a try catch method like in my example.
  13. The language is set by what url you view a page.
  14. But PLZ don't post that code in here inline, it's crazy
  15. What about the two times in your code where you do $u->save(), doesn't that save something in DB? Don't think you'll find the issue (apart from that it's something already fixed), as it's quite a complex issue. But if you read the bug report you'll maybe understand, that saving the user will set the language to default for various reasons how the system is built. Maybe you're able to just use the pre 2.5 dev (very stable), or try work around it by setting the user language before saving, but doubt it will work as the issue is on saving a page (users are pages) on front-end using multilanguage.
  16. Just to clarify, PW doesn't save something on it's own unless you do. And it has nothing to do with Twitter Bootstrap of course... So as we see it's in your code that does save the user. Unfortunately PW2.4 there was a bug (linked above) that seems to be the issue here.
  17. I once drove on my bicycle down a road while having a bag hanging on the front handle bar. The bag got into the front wheel and in the split of a second, me and my bicycle made a complete 360 turn and landed right on the wheels again continue driving! I had a shock and couldn't believe what just happened.
  18. And why do you use a bootstrap to login? In a bootstrap there's no language/page context.
  19. There's no reference, it's a normal page. The only reference is the pagetable field itself. Ring a bell? $thepage = $pages->get("template=basic-page, mypagetable=$page");
  20. Maybe define it on the init and not ready. Bootstrap doesn't trigger ready as its not web context.
  21. Not sure where this should be addressed, but Spex uses the $config->styles $config->scripts to collect those assets. But to work with AIOM it needs to be relative to /templates/ folder . But if I want custom modules that for examples adds it's own css to the $config->styles->add() and the path to that will be in the module folder /site/modules/MyModule/MyModule.css it doesn't work. Also from time to time third party modules don't happend to have a check if on backend or frontend, and the populate the $config->scripts even on front-end, which results in an error in AIOM. Wouldn't it be better to have a custom $config->siteScripts $config->siteStyles filearray (same as PW backend) to populate assets? This would be to avoid conflicts.
  22. Cool when you Put that sitep live, I'll fill up your site with millions of pages.
  23. I'm confused as to why you need *= . This should just work fine $pages->get("/places")->children("tags=foodID, tags!=accomodationID")
  24. This negative selector is for textfields. Also *= is for textfields. Maybe you are lucky and "!tags.title*=accomodation" works. Page fields work with ID's "tags=1233|1232" To search for a title within the selected pages you'd use a subfield selector "tags.title=abc"
  25. No, "current" class on lists works as usual. For one page websites, this of course doesn't work, cause you're not on a page it could make "current".
×
×
  • Create New...