Jump to content

Ivan Gretsky

Members
  • Posts

    1,510
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by Ivan Gretsky

  1. I think Manaus is talking about "Name format for children" option under Family tab of the template when only 1 template for children is allowed. Availiable options are described here. But me too would want them to be more rich, maybe something like in this Adrian's module. Edit: Checked it out and did not find a way to combine date and title (with or without custom text in between). If anything but "PHP date format" is in the field we get what Manaus showed in his post: something like 15313431mondayeurope-moscow.
  2. Was about to try XCloner as I know it back from Joomla times and found this vulnerability report, which seems to be not answered in any way by the XCloner team. Searched exploit-db.com for Akeeba and found just one which seems to be not so important one. Actually I would like to use some free script, but that the way it.is. By the way there are no entries about "processwire" there.
  3. Good day! There was much talk about translatng PW recently. So this idea, if realised, probably could serve many... Translation is best done in context. So you can see on what page and doing what the user sees the string to be translated. One way I can think of in-context translation is allowing a translater to translate a string while browsing admin interface. A module I want to request should add markup to all translationable strings which will somehow highlight them when it is turned on. It should also be possible to (right?)click on that string and be linked to language translator page with corresponding file opened. What do you think about it?
  4. Looking really nice. And the "powered by processwire" logo in the footer only makes it better)) Formbuilder forms could benefit from some styling, but they are not so easy to customize.
  5. @Soma: My function returns all pages under a page, not only grandchildren. Is there a way to achieve this by selectors only? @Kay Lohn: You should call the function with both parameters, of course: $children = getAllDescendants($pages->get('/events/'), false)->find("template=photo_page_template, parent=/events/, include=all, is_featured=1, sort=-date, limit=3"); $prependRoot determins whether the root page will be included in the PageArray returned by the function. Should have put a default value for it anyway. My fault.
  6. This code <?php foreach ($pages->find("template=photo_page_template, parent=/events/, include=all, is_featured=1, sort=-date, limit=3") as $child) { ?> will not work - it will only give you the direct children of /events/. The whole topic is about how to get all subchildren and/or only grandchildren, so read above )) If you incorporate my little function, you could do what you intend like this: <?php $listingPages = getAllDescendants($pages->get(/events/))->find("template=photo_page_template, parent=/events/, include=all, is_featured=1, sort=-date, limit=3"); foreach($listingPages as $listingItem) { ... }; ?> This way you only get featured photoes from under just the selected parent. You could just place the function in the template file before the actuall call to it. To have it to my disposal at any template I put it in _functions.php, which could be prepended to every template file by putting this line in the site/config.php file of your installation: $config->prependTemplateFile = './includes/_functions.php'; where "/includes/_functions.php" is the path to the file relative to templates directory.
  7. Could it be something with the system requirements not met? Check 'em out.
  8. The problem seems to be solved. As I did not localize it accurately enough in the first place, I cannot be 100% sure, but it seem to work alright now. Thank you, Adrian. Will report back if something goes wrong.
  9. ...and just to contribute to the original topic. I use this function to get all subpages of a page: function getAllDescendants ($root, $prependRoot) { $descentants = new PageArray(); foreach ($root->children() as $child) { $descentants->add($child); if ($child->numChildren()) { $descentants->add(getAllDescendants($child)); } } if ($prependRoot) $descentants->prepend($root); return $descentants; } I include this function in _functions.php file which prepends every template file and use it like this: <?php $listingPages = getAllDescendants($pages->get('some selector'))->find("some selector"); foreach($listingPages as $listingItem) { ... }; ?>
  10. @Kay Lohn: Your "...limit=3" selector fires several times - as many, as there are children under "Projects". And each time it limits maximum number of featured photoes under that category. So you can output a maximum of (3 x NumberOfProjectsChildrenPages) featured photo pages. As Macrura suggested there are better/simplier ways to do what you intend to, like: <?php foreach ($pages->find("template=photo_page_template, include=hidden, sort=-date, limit=3")) { ?> <a href="<?php echo $child->link_to_page->url; ?>"> <img src="<?php echo $child->my_image->url; ?>" alt="<?php echo $child->image_desc; ?>"/> </a> <?php }; ?> Where photo_page_template is the template of you photo pages.
  11. Good day, Adrian! I believe I found a bug in the module. Once again it is probably encoding related (you're becoming true authority on that, like it or not ). If "Rename on Save" option is checked and you have some images in RTE field, non-latin characters get screwed up on save. Like this: Most likely none-RTE fields and RTE fields without images are not affected.
  12. There is a list of 3rd party modules on Mobile-Detect github repo page. It can be beneficial both for PW in common and the module to include the latter in that list. @justb3a: If you feel like the module is mature enough please consider submitting it there.
  13. Yes, but I do not know how to insert a tab with classified items and a button in the first place )) Could you help on this too?
  14. Yes, I understand what you are suggesting. Thank you! But this solution seems to me a bit "clumsy". I think it would be more convinient for the client to have a tab like "Children" with a list or related classified items and a big green button "Add new classified item". When user pushes that button he should be send to a new page creation screen with "classified-item" template chosen under specified root page AND company page field set to the company page he came from. Do you have an idea how this could be done?
  15. Good day! Sorry for not finding it if it is already out there in the forums. I did try, but probably do not even know the right words to put into a searchbar. I need to put a button in the page edit screen of the admin for a specific template. When a user clicks on that, he should be led to creation of a new page, related to the one he is on. Making it more of a real-life situation: it is a company page with a template "company" under "company-root". I need to place a "Create new classified Item" button on the edit screen for every saved page with that template When a user clicks on that he should be led to creation screen for a new page with "classified-item" template to be stored under "classified-root" template. I guess this should be a module which hooks into some method... But I am in the beginning of my journey to PW module-making, so please give me some (preferably clear and simple) directions.
  16. I just downloaded and tested Pretty Photo on Windows with Firefox. The example does work smoothly (exept for some problems with flash). On your site it does not.
  17. I'll dive into it ))
  18. My bad. I thought it is out of scope error (which probably happened when majkris was performing $fields->save if I got it right). I am glad Adrian helped us here. But I want to take something out of this for myself too . As I understand, $page = $event->arguments[0]; sets $page variable in the scope of the class method. But I do not know what is $event and its arguments. Where do they come from? I would be happy to get an explanation or a link to documentation article/forum post.
  19. Welcome to the friendly forums of ProcessWire dear Majkiris! Check this out. It will probably help with you in your quest.
  20. This is what I think we should ask to be done - generate the "translation" files for the default (English) language. We surely should base all further work on that and should be able to update the base translation easilly by parsing the core with in-build tool and meging the results to github. I plead the gurus of PW forum to help us with that.
  21. Just a wild guess - try putting your main.js file under jquery link or remove it at all.
  22. Lisandi! I am sure there are some better ways to manage translations than this one used in PW now. But I think it is not wise to expect Ryan to change this system at once. You write some clever stuff, but not sure that many have enough patience to get into the topic and read so many letters . I suggest we do try to get the best out of what we have by some small enhancements at first, and plan for complete rewrite in PW 4.0. As I see it languages are pages in PW now, and translation files are stored under assets/files/#### where #### is the number of the page (can vary from installation to installation for the same languages). Each file there represents the translation for one core file where the translatable strings can be found. Those files are in JSON and do not contain the original string which is always in default language (English). We need to export the default language files with all the strings translated to github repo, import them to Weblate, do the translation, export to github repos corresponding to languages and then (for now) manually install them in manually created language pages. I am stuck on step one - "export the default language files with all the strings translated". Can get all the files without translations, but not with the default string values.
  23. I do not see any obstacles to test out weblate + github for translations. I searched weblate repo and did not find Processwire there yet. Lisandi, why don't you start the project and configure it as you are most familar with the software. If it can't be done the way PW stores translation strings please report back so we can deal with it. If the translation project grows and becomes important for the community, you could then hand off or share the administration rights with those interested (and probably Ryan first). We can deal with documentation and integration later. What do you think about it?
  24. We missed black friday, but cyber monday is still coming .
  25. I think it is a very important topic lisandi brings up. Lack of decent translation for PW (at least for languages other than Deutsch and Finnish) is the thing that could limit its propagation. There is a Russian translation module, but it is quite outdated. I still can't figure out how to easily update it - the translation workflow is complex and not documented in any way. There are probably no translations for any modules in Russian. This topic was brought up several times by many but was never made clear. Managing translations could require some adjustments to the software itself. As our community has a distinguished leader and most architectural decisions are made with some sort of his approval I would ask Ryan to step in. We are eager to solve our problems ourselves, but we want to do it together in a non-contradictory way. Let's decide on something )) Translations are a step to make PW more wide spread and therefore to make its development and support more economically advantageous, as I see it.
×
×
  • Create New...