Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Andy

  1. Hi @bernhard Impressive project. It's a little jealous that I can't do that yet. Tell me please, why did you use RockForms here when you have the PW Form Builder?
  2. How to enable archive support in PHP. Your web hosting provider must have these options enabled when running PHP. If you control this yourself, add these keys on the PHP command line: --with-bz2=/usr --with-zip --with-zlib Detailed instructions are here: https://bobcares.com/blog/enable-php-zip-extension-cpanel/
  3. Hi @ryan I made a small function to help Slavic translations. function my_decl($n, $forms){ $modulo = $n % 10; $dec = $n % 100; return $n . ' ' . (($dec > 9 && $dec < 20) || $modulo > 4 || $modulo == 0 ? $forms[2] : ($modulo == 1 ? $forms[0] : $forms[1])); } echo my_decl($leta, ['rok', 'roky', 'let']); // cz echo my_decl($chas, ['година', 'години', 'годин']); // ukr echo my_decl($girls, ['девушка', 'девушки', 'девушек']); // ru Czech version: When $leta=0, it returns the string '0 let'. When $leta=1, it returns the string '1 rok'. When $leta=2, it returns the string '2 roky'. When $leta=30123, it returns the string '30123 roky'. When $leta=30120, it returns the string '30120 let'.
  4. @Thromisios By the way, Ryan wrote an article on how to start a PW installation. https://processwire.com/blog/posts/starting-with-the-blank-profile/ It can be helpful.
  5. Hello @Thromisios First, I would refer you to the ProcessWire documentation - https://processwire.com/docs/start/ And then, look through the sections of the forum: https://processwire.com/talk/forum/8-getting-started/ https://processwire.com/talk/forum/13-tutorials/ https://processwire.com/talk/forum/6-faqs/ Next, I would look at the sections of the forum and documentation that raise more questions for me. And of course https://www.php.net/ when you don't understand how PHP works. Good luck with your adventures.
  6. Hi @ryan Slovenian "Language: sl\n" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n" msgid "%d translated message" msgid_plural "%d translated messages" msgstr[0] "%d prevedenih sporočil" msgstr[1] "%d prevedeno sporočilo" msgstr[2] "%d prevedeni sporočili" msgstr[3] "%d prevedena sporočila" Russian "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" msgid "%d day ago" msgid_plural "%d days ago" msgstr[0] "%d день назад" msgstr[1] "%d дня назад" msgstr[2] "%d дней назад" Czech (some as Russian) msgid "Updated %d path" msgid_plural "Updated %d paths" msgstr[0] "Aktualizována %d cesta" msgstr[1] "Aktualizovány %d cesty" msgstr[2] "Aktualizováno %d cest" Almost all Slavic languages have such plural forms. If you get support for these multiple forms, it will greatly improve the translation. Gettext algorithms for all languages can be found here: http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html
  7. @Райан It's written like a good detective novel. It's a pleasure to read.
  8. @ryan When Cyrillic letters are used in the name, capital letters are no longer transliterated. Small letters work fine, but capital letters does not work. echo $sanitizer->pageNameTranslate('Город'); // "gorod" The problem started after upgrading ProcessWire to 3.0.184 Before that everything was working fine. If anyone has any thoughts on this, I'd love to hear them.
  9. @Адриан I found today that not all phrases are translated. This applies to the configuration file. I can't understand why this is happening. array( 'type' => 'checkbox', 'name' => 'autoload_assets', 'label' => __('Autoload Assets'), 'description' => __('Autoload module CSS and JS files.'), 'notes' => __("If you disable this, you will need to load these files manually:\n```&lt;link rel='stylesheet' type='text/css' href='/site/modules/CookieManagementBanner/assets/css/CookieManagementBanner.css' /&gt;\n&lt;script defer src='/site/modules/CookieManagementBanner/assets/js/CookieManagementBanner.js'&gt;&lt;/script&gt;```\nNOTE: you must load the JS file with the defer attribute."), 'value' => 1 ), The configuration does not use translation, but shows the original text. The angle brackets are not displayed as they should be.
  10. @kixe No. That's not how it works now. // Single select example $page->of(false); $page->multy_select_field = PageArray( wire('pages')->get(1111) ); $page->save(); $page->of(true); // Multyple select example use construction $a = PageArray([ $page1, $page2, $page3 ]); $page->of(false); $page->multy_select_field = PageArray([ wire('pages')->get(1111), wire('pages')->get(2222) ]); $page->save(); $page->of(true);
  11. @bernhard At one time a module was written to manage customer orders. In 2013, Apeisa published Shop for Processwire version of DEV. There were a lot of interesting points there that we used. Payment gates with our bank were gradually added. Most importantly, it's all written for the kind of commerce our store uses. Usually CMS for trading offer their own trading algorithm. And this is not always convenient.
  12. @clsource Nice article. All in all, very true. However, I disagree with one point. At one time, I went through a lot of CMS in search of a basis for the development of the store. In the case of complexly organized product hierarchy, all other CMS do not allow to implement an effective solution. And only ProcessWire makes it easy to implement the most complex hierarchy. At the same time, it can handle the load of a million requests. Moreover, I started my work in 2013. Now ProcessWire has many more features and capabilities.
  13. @3fingers It's a neat solution. Thank you.
  14. @3fingers It would be nice if you could share your invention.
  15. @kongondo Not now. This layout works fine as it is.
  16. Thanks to @kongondo's example, I also began to use tailwind.
  17. @kongondo There is a more elaborate and functional free online shop layout. It is based on UIkit 3 and other technologies. Check it out. Project on github Demo This layout is more suitable for full-featured online shop if you sell something more complicated than shorts and shirts.
  18. At the moment the site layout is not responsive. The problem is hidden in the footer. <nav class="footer_nav"> <ul class="flex justify-center space-x-10 uppercase"> To prevent horizontal scrolling on smartphones, you need to add one more element - flex-wrap. <nav class="footer_nav"> <ul class="flex flex-wrap justify-center space-x-10 uppercase">
  19. Hi @bernhard Congratulations! Great project. I found some interesting solutions for myself. Thank you. I would like to share a color picker trick. When you give the user a choice of colors in a finished design, unpleasant color combinations are possible. In such cases, we offer a choice of predefined color pairs or whole color patterns. And further. A map is often published in the news. Maybe add a map module?
  20. About Padloper support board Oops! You do not have permission to view this topic.
  21. Although, I wrote my shop a long time ago. But with pleasure I will test yours too. My store was founded 10 years ago on the Shop-for-ProcessWire v-001 module that @apeisa wrote. But I've rewritten pretty much everything, and I'm constantly adding new features. Conventional store systems don't work for us, as we have many different product properties. In addition, the store has a peculiar sales algorithm. As well as a special payment gateway for a local bank. And also loading goods from the warehouse accounting program.
  22. Hi @Pete Most likely this is a common problem for Invision board. The subscription letter comes in two formats - text and html. Everything is correct in html, but the link in the text is broken. As example: Go to this Post: https://processwire.com/talk/topic/14921-admin-actions/?do=findComment&amp;comment=217821 No need mask ampersand here. Go to this Post: https://processwire.com/talk/topic/14921-admin-actions/?do=findComment&comment=217821
  23. Hi @Manaus Why don't you use a function? <?php namespace ProcessWire; /* * * /site/templates/_func.php * use include_once in your code template */ function my_render_link($selector) { $current = wire('pages')->get($selector); if($current->id){ $out = "<a href='".$current->url."'>".$current->title."</a>"; }else{ $out = false; } return $out; } ?> I haven't tested but should work.
  24. Hi @bently76 Your request is not entirely clear to me. We are here discussing situations related to the CMF ProsessWire. And you work on CMS Wordpress. These are slightly different universes.
  25. @CBE The method of accessing other pages certainly works. Perhaps you have an error somewhere or access to the page is denied. There is little information on this here. Try to break the task into steps, check it step by step. $my_page = $pages->get('/general-information/'); if($my_page){ $my_img = $my_page->front_image; if($my_img){ $my_url = $my_img->url; }else{ echo "Image not acces"; } }else{ echo "Page not acces"; } Or just see what PageArray returns to you $my_page = $pages->get('/general-information/'); if($my_page) print_r($my_page); // use var_dump($my_page) for bit more info
  • Create New...