• Content count

  • Joined

  • Last visited

Community Reputation

11 Good

About neosin

  • Rank
    Full Member

Profile Information

  • Location
  1. @FireDaemon here are some other options. It depends how complicated you want to make things.
  2. @MilenKo For interfaces (buttons, short strings, etc) this is what we do, I am not saying either way is better just different way of doing this. ## _languages.php $lang_strings = array( 'home_button' => array( 'en'=>'Home', 'fr'=>'Acceuil', ), 'about_button' => array( 'en'=>'About', 'fr'=>'Apropos', ), 'links_button' => array( 'en'=>'Links', 'fr'=>'Liens', ), ); ## _func.php function userLang($lang){ switch($lang){ case 'fr': $lang = 'fr'; break; default: $lang = 'en'; } return $lang; } ## _main.php $lang = userLang($user->language->name); <nav> <div><a href="#"><?= $lang_strings['home_button'][$lang]; ?></a></div> <div><a href="#"><?= $lang_strings['about_button'][$lang]; ?></a></div> <div><a href="#"><?= $lang_strings['links_button'][$lang]; ?></a></div> </nav>
  3. @adrian thank you very much for that
  4. In the PW website modules section, currently it is up to module authors to mention if their module is supported by whatever version of PW. Use the power of the community to solve the busy dev dilemma! It would be great if users could have some way to indicate a particular version works for them or not. Perhaps a simple "This module (works/or not) with current version (insert version here) of PW" and then in the module listing it shows a table of versions user have confirmed it works with. PW version | Module version | Works / Not Works 2.0.71 | 0.0.1 | 100 users said this works 3.0.95 | 0.0.1 | 100 users said this does not work 3.0.95 | 0.0.3 | 20 users said this works / 1 user said this does not work 3.0.96 | 0.0.3 | 31 users said this works Bonus of implementing this would be that it also helps lessen the forums threads "dos this module X work in PW version X?" I wonder if the poll module could be used for this?
  5. can anyone enlighten me as what the ASM stands for or means? I keep seeing references to it all over PW forums/docs ty
  6. @ryan it would be great if there was an option to save the map (using static maps api?) to an image file locally and that local image would update should the map field values change. This would mean not needing to use an API key since the traffic would be to your hosted image and not making requests to google maps api each visit. So to the cms user they are seeing gmaps as usual but the cms saves a static version of their work to an image that is used on the output side. Also it would be neat to have a checkbox that enabled to use JS/CSS to provide artificial zoom/map moving function using the static map image assuming it was at a decent resolution/dimensions and perhaps marker placement as well. Otherwise if the checkbox is un-selected, it will show a map image of defined dimensions with no zoom or bells & whistles, etc.
  7. @Macrura I am very interested in this, is it available as a package or module for download?
  8. @dragan thanks for this, it solved my issues with the module now I just need to figure out how to hide the "Pages" link in the admin navigation from this user role
  9. ah gotcha, thanks for the clarification. I think the simple fallback solution is awesome. here's a list of the latest supported browsers for anyone interested
  10. you can use grid in grid. since there is no support for sub-grids at the moment, the only way to do a layout is grid within grid. you just have a re-declare the grids that go inside the other grids. here's a quote from the smashing mag grid article What this is saying is that you cannot have a single grid system to deal with the layout but rather you need grids within grids. This creates extra code but still not as much as say something like flexbox and all it's css&divs. Also there is not reason why you can't use css-grid and bootstrap together. SImply ignore the flexbox components. Here is a sample Bootstrap responsive layout using CSS grid . Not a whole lot of code. (make sure to click the html/css tabs to see the src) also, here's a neat project Bootstrap’s grid in CSS Grid
  11. @Mike Rockett i have an events content type and the event pages expire and unpublish after the date has passed however events that are flagged as special can remain active (the url) because it will have been promoted across various media outlets. These expired special event urls will redirect to a related published content item. The related content items do not exist before or during the events. The related items are added by an editor shortly after the event has finished. Then 6 months later an editor comes back and unpublishes whichever special events they need to remove. perhaps with PW there is a better approach? I am new to PW please go easy on me
  12. updated and I can confirm the issue is resolved thanks. On a side note, I keep getting mixed up with the save buttons all over the place in the modal and the pages. Clicking save twice will take some getting used to.
  13. I found a definite bug (latest module+pw 3.0.96) If you go to a page and click children, choose batch edit, choose "edit" mode (only one i tested) as the option and then in the list; edit some children in the modal and save those - the children titles in the parent will have no value set for "title" and in the batch list it now shows empty values where the titles used to be. It appears that the variable for title is not saving or updating properly. I was editing other fields but for some reason it made my titles blank when I didn't edit the titles... very odd. also the title in the actual children themselves is now empty (in English, French is fine)
  14. @bernhard thanks, this should work I guess while($row = $result->fetch_assoc()) { $title_en = wire("sanitizer")->text($row['title_en'], array("maxLength"=>128)); $title_fr = wire("sanitizer")->text($row['title_fr'], array("maxLength"=>128)); $p = wire('pages')->get("title={$title_en}"); if(0 < $p->id) continue; $p = new Page(); $p->title->setLanguageValue($languages->get('en'), $title_en); $p->title->setLanguageValue($languages->get('fr'), $title_fr); $p->save(); }
  15. how would I do this for multilingual data? if in the external DB in each row we have some fields for both languages example: $row['title_en'] $row['title_fr'] $row['summary_en'] $row['summary_fr'] $row['other_en'] $row['other_fr']