Jump to content

adrian

PW-Moderators
  • Posts

    11,182
  • Joined

  • Last visited

  • Days Won

    372

Everything posted by adrian

  1. You think that's cool - check out the new "Pages > Find" functionality which makes use of Lister, which is now available in the latest dev 2.4.4 PS, the new Users section uses Lister too
  2. You need to change your: != "" to: !== "" EDIT: It's a PHP zero empty thing Google "php empty zero" or something else along those lines.
  3. I have no need for the German language pack , but I am always so impressed about how quickly you are on these updates. I am sure lots of users are super appreciative!
  4. This is really rough, but I have tested it and it does work $p = $pages->get("/test/"); $rf = "repeater_test"; //repeater field name $ptf = "pagetabletest"; //pagetable field name $ptt = "basic-page"; //pagetable template name foreach($p->$rf as $r){ $npt = new Page(); $npt->of(false); $npt->template = $ptt; $npt->parent = $p; foreach($r->fields as $f){ $npt->$f = $r->$f; } $npt->save(); $p->of(false); $p->$ptf->add($npt); $p->save(); } The key thing is that for this to work as is, the repeater field must include a title field, because this is used to generate the names of the child pages for the pagetable entries. You could of course manually add a title field in the loop when creating the $npt page. EDIT: You can ignore the need for a title by making the title hidden and not required in the context of the pagetable template and setting a value for the automatic page name format when setting up the pagetable field. For this to work, the pagetable field must be already set up and ready to go. If I had more time today, I would have enhanced this a little more regarding the title/name issue, but hopefully it should get you going.
  5. Hi skidr0w and welcome to PW. I am not a multi-language guy, but have a read from this post onwards: https://processwire.com/talk/topic/2979-multi-language-page-names-urls/?p=35403 I skimmed quickly, so not sure how much it helps.
  6. Danijel, If I understand what you mean, then it's simply: foreach ( $page->children as $product ) { echo $product->sc_price; } The renderPrice function included in the shop module (https://github.com/apeisa/Shop-for-ProcessWire/blob/e27eb462502feecca085db82d3183204b2925850/ShoppingCart.module#L278) is just there to format the price, it is not needed at all to get the price for the product. Not sure how far along you are in your PW learning process, but the $page->children foreach is only relevant if you are on a page with multiple child pages as products. If you are on a single product child page already, then you might simply want this: echo $page->sc_price; Remember that $page refers to the current page being viewed, so in this case you are asking for the sc_price field for the current page. Hope that helps.
  7. Hi Danijel and welcome to PW. I haven't used the shop module yet, but I think what you are probably looking for is something like this: $product->sc_price So now of course you need to define $product. From looking around I think this should work: foreach ( $page->children as $product ) { echo $modules->get( "ShoppingCart" )->renderPrice( $product->sc_price ); }
  8. It actually depends a bit whether you want a single checkbox, or an array of checkbox items to choose from. The former is simply a matter a creating a field of type checkbox. The latter is what Martijn is talking about and requires creating a pagefield.
  9. You can do this: $userid = $users->get("$userName")->id; $ps = $pages->find("created_users_id=$userid");
  10. Exactly! I have submitted an issue for Ryan, but I have just been commenting that line out completely and things seem to work fine.
  11. Here are some multisite things to look at, in case you haven't seen them: http://modules.processwire.com/modules/multisite/ https://processwire.com/talk/topic/1025-multisite/?p=46652 https://processwire.com/talk/topic/3534-one-processwire-installation-folder-for-multiple-sites-without-symbolic-links/ https://processwire.com/talk/topic/4566-is-there-a-disadvantage-to-adding-modules-to-wire/ https://processwire.com/talk/topic/816-multi-site-setup/
  12. I agree about that PW intro video - I know Ryan is self-conscious about his spoken videos, but there was definitely something about his approach that got me hooked. I think it can be hard to find the right balance between being professional enough without going too far and coming across as a hyped up marketing spiel, vs being too low budget and hokey. This video was the right balance for me. I think in general PW could benefit from upping the marketing anti a bit, but not too much!
  13. Same here - I remember googling "best open source cms" and ending up at cmscritic.
  14. After going through the process of testing out PageTable fields I came to this conclusion as well, but I don't think it is obvious the first time you set up a field, especially given that "Select a parent for items" is closed by default and even when you open it, it reads "This is optional. If no parent is selected, then items will be placed as children of the page being edited.". I guess I think it might help if this was initially open and the decription or note field stated that a specified parent is the more common usage because of the issues that can occur with mixing in PageTable children with regular children in a URL accessible part of the site structure. I can see lots of dropdown menus containing PageTable children before people figure it out. But, maybe it's just me Anyone else initially confused?
  15. Here are the instructions for upgrading PW: https://processwire.com/talk/topic/52-how-do-i-upgrade-processwire-to-the-latest-version/ You shouldn't need to do anything with already installed modules - they will stay installed and activated. If you want to actually upgrade an existing installed module, you can simply click on the name of a module on the module page and then click the "check for updates" link - follow the prompts - all automated!
  16. Based on this and the fact that there are no redirects, the only thing I can think of is an apache rewrite. Are you using the standard one that comes with PW? This seems unlikely given that your other pages are working fine. Do you have any modules installed, or custom hooks running? Have you tried a fresh PW install, or at least copied over a new version of wire, .htaccess and index.php ? EDIT: Looking at your code and description of the problem I am getting more confused. Am I right in thinking it must be from: window.location.href = result.gameUrl; What do you get if you: console.log(result.gameURL);
  17. This is the only info on PageTable I think: https://processwire.com/talk/topic/6417-processwire-profields-table/page-2#entry62890 Read from that post onwards.
  18. You'll need to use: http://skyscraper.dev the first time to try to go to the address. After that your browser will realize you're not trying to search for it and you'll be able to just enter: skyscraper.dev Bring back the search box if you ask me
  19. Is it possible there is some redirect code in the student template php file? Can you show us the code for that template?
  20. Glad you got it all sorted out - looking forward to seeing the gallery once the site is live!
  21. Well normally the upgrade process should work perfectly smoothly by following the "check for updates" link in the module config, but because of the incorrect folder issue, I would recommend uninstalling and deleting the old version and installing the new version from scratch - everything should be fine after that. Yep - click the uninstall link and then back on the main modules page you can click the delete button to remove the module completely, before installing the new version.
  22. I am thinking this is probably due to the change of install folder for this module. Did you uninstall and remove the version you had installed in the GetVideoThumbs-master folder before installing the new version? If you are still getting the internal server error, I would first remove all the video module folders from the modules directory and see if that solves it. If not, you might need to go into PHPMyAdmin and remove the entries for this module from the modules DB table. Please let me know if you are not familiar with this and I'll give you some step by step instructions.
  23. davo, I agree with Soma that we should continue this conversation back in the module thread.
  24. Go to the Operations Tab in PMA and there you can adjust the current autoincrement value.
  25. Looks brilliant - thank you!
×
×
  • Create New...