Jump to content

neosin

Members
  • Posts

    107
  • Joined

  • Last visited

Everything posted by neosin

  1. Perhaps there is a better way but I couldn't find anything on how to get the default language slug so i added this to _func.php function userLang($lang){ switch($lang){ case 'default': $lang = 'en'; break; case 'fr': $lang = 'fr'; break; default: $lang = 'en'; } return $lang; } just switch 'en' for whatever your default is and change or add the others like 'fr'. and in my templates I have $lang = userLang($user->language->name); for my variable names I use fieldname_lang, so this way I can do $page->${"fieldname_".$lang} for example if you have image fields such as post_image_en and post_image_fr this way you can show the image that corresponds to the visitors chosen language
  2. I have a page with an image field that is used by a template with the same field name. If a user creates a page using the template and does not fill in the image field, then it should use the image field from the page. I have this working. The problem I am having is getting the path to the image if the user leaves it blank and it uses the "default" assigned image. How do I get the path of the default image? I can get it's filename but can't figure out how to get the path for it since it comes from a different page. thank you
  3. @adrian excellent, tyvm **update to add, this works like a charm!
  4. for multilingual sites, what is the process for importing from a single table that contains fields in 2 languages? ::mytable ---title_en ---title_fr ---description_en ---description_fr I need to import 300k records and before I proceed I want to make sure how to do it, thanks!
  5. @Sergio thank you, can you confirm if the profields repeater matrix support multi lang? much appreciated
  6. I am interested in buying ListerPro, ProFields and ProCache but before I do i need to know if they all work with multilang sites (2 language site) thank you
  7. just curious if the Page Paths module works now with multi-lang sites since it has been around for many years, because I would like to use it but am hesitant to install it due to the description thanks in advance
  8. @Ferdi Derksen that is awesome, look forward to the updates!
  9. thank you for the clear example, I was not even aware of the template regex possibility until this moment, mind you I've only been playing with PW for 2 days. This is great news and means less coding required and no changes of template code if things change down the road in the project. thanks!
  10. I haven't test this yet, just trying to pre-strategize before I get the code going When using urlsegments on a multilingual site would I need to include the translated url segment value for the alternate language or will PW handle it? for example in my template if I put if($input->urlSegment1 == 'map') but in the alternate language the segment would be "carte" instead of "map", will PW know by itself that map=carte or carte=map or do I need to take that into consideration in the template also? if($input->urlSegment1 == 'map' || $input->urlSegment1 == 'carte') thanks in advance
  11. I just installed this on PW 3.0.95 and noticed that once installed it expects the module settings values to be filled in regardless of whether or not you want to use it right away. Would it be possible to remove the assumption that the values are defined, meaning if setting values are empty - do nothing & exit? the errors that popup are PHP Warning: in_array() expects parameter 2 to be array, string given in ...\modules\PublishToTwitter\PublishToTwitter.module:366 and PHP Warning: implode(): Invalid arguments passed in ...\modules\PublishToTwitter\PublishToTwitter.module:442 Feature request Page tweet preview option before posting page and sending tweet. This would help cms users to double check the tweet will be as expected before posting. We've had cases of wrong images, broken links, typos etc not being noticed before publishing and post to twitter by cms users. This preview function would help double check accuracy before letting the world see it.
  12. I just installed this module and with PW 3.0.95, Tracy shows me the following notices PHP Notice: Trying to get property of non-object in ...\RestrictMultiLanguageBranch.module:140 line 140 code: if($p->id === 1 || !isset($this->data['multilanguageStatus'][$this->closestSpecifiedParent->id])) {
  13. I am trying to make a module and it should create some pages during installation but I need a list of the field type properties/parameters that I can use with the field types. I've found http://cheatsheet.processwire.com/fields/field-properties/ and https://processwire.com/api/variables/fields/ neither shows the properties available such as how to make a field "required", or format a date field's input or output etc I'd like to format some dates, require some fields and stuff like that thanks in advance
  14. thank you for this tip! much appreciated
  15. thank you so much, this will help me out for sure and set me on the right path to success with PW! much appreciated
  16. I've been reading through the tutorials and have created an admin module based on the ProcessHello example module. I have a few questions regarding how to do a few things with the module that are not obvious or covered by the processhello tutorial. Outline of expected module functionality: The custom module admin setup page should contain a list of its editable pages. CMS users will be able to add/edit/delete pages of this module. The modules editable pages use the same defined fields. The editable pages data will need to be available for use by another custom module. This custom module (called "Stream Encoders") will handle creating/updating/deleting of "Stream Encoders". The encoders contain various fields such as encoder name, operational status (is it on or off) and brightcove asset ID A second module in "admin>setup" called "Video Streams" will handle creating/updating/deleting/scheduling of "Video Streams". Each video stream belongs to a video encoder and uses some of the settings from the encoder selected, such as the encoder title and the brightcove asset ID which on the frontend are used to display the video stream. My noob questions: Since they are not "pages" in the navigation tree, how do I define these "encoders" to add them to the custom stream encoders module? I don't believe my custom modules should be under "Setup", is it possible to have custom menus in the admin? It's fine if they can't but it would be more intuitive if they had their own menus in the admin instead of living under "Setup". Without having a specific page on the frontend for video streams, how would I access the data for a specific video stream from the home page? for example if I wanted to display a specific or random video stream in a sidebar on the homepage. Are there any tutorials on using scheduling with custom modules? The video streams can be scheduled or turned on/off as desired by the CMS users. thank you in advance
  17. ok tyvm, just wanted to have confirmation before install them
  18. There are lots of great looking modules that I would like to use but I am hesitant to install them purely due to the lack of visual indication that they are compatible with PW v3+. Most of the ones I want to use say they are compatible with previous versions up to 2.7 so a few questions: Does this mean they are not compatible with v3 ? it would seem so since they lack the v3 tag If I try them and something doesn't work and I remove them are all traces removed or can they leave artifacts behind in the DB or filesystem? thanks in advance
  19. I managed to resolve the installation issue by installing on a windows machine with no ACL. Now the installation went just fine. weird! thank you for your time
  20. thanks, it seems that same issue was never resolved. I guess I am out of luck trying to test this locally
  21. During the install process I can never get to Step 4 for setting up an admin account. It creates the database and in the screen it shows it installed the database and imported the SQL and under that it shows "Profile Import" but nothing else. I have the same result with master & dev branch. I looked in the database and do not see a user table of any kind, unless it has some other name than "users"
×
×
  • Create New...